Merge pull request #2 from TheBlueMatt/main
authorArik Sosman <arik-so@users.noreply.github.com>
Sat, 6 Mar 2021 00:59:13 +0000 (16:59 -0800)
committerGitHub <noreply@github.com>
Sat, 6 Mar 2021 00:59:13 +0000 (16:59 -0800)
Expose Features

296 files changed:
README.md
gen_type_mapping.py
java_strings.py
liblightningjni.so
src/main/java/org/ldk/batteries/ChannelManagerConstructor.java
src/main/java/org/ldk/enums/LDKNetwork.java
src/main/java/org/ldk/enums/LDKSecp256k1Error.java
src/main/java/org/ldk/impl/bindings.java
src/main/java/org/ldk/structs/AcceptChannel.java
src/main/java/org/ldk/structs/AnnouncementSignatures.java
src/main/java/org/ldk/structs/BuiltCommitmentTransaction.java
src/main/java/org/ldk/structs/ChainMonitor.java
src/main/java/org/ldk/structs/ChainParameters.java [new file with mode: 0644]
src/main/java/org/ldk/structs/ChannelAnnouncement.java
src/main/java/org/ldk/structs/ChannelConfig.java
src/main/java/org/ldk/structs/ChannelDetails.java
src/main/java/org/ldk/structs/ChannelFeatures.java
src/main/java/org/ldk/structs/ChannelHandshakeConfig.java
src/main/java/org/ldk/structs/ChannelHandshakeLimits.java
src/main/java/org/ldk/structs/ChannelInfo.java
src/main/java/org/ldk/structs/ChannelKeys.java [deleted file]
src/main/java/org/ldk/structs/ChannelManager.java
src/main/java/org/ldk/structs/ChannelManagerReadArgs.java
src/main/java/org/ldk/structs/ChannelMessageHandler.java
src/main/java/org/ldk/structs/ChannelMonitor.java
src/main/java/org/ldk/structs/ChannelMonitorUpdate.java
src/main/java/org/ldk/structs/ChannelPublicKeys.java
src/main/java/org/ldk/structs/ChannelReestablish.java
src/main/java/org/ldk/structs/ChannelTransactionParameters.java
src/main/java/org/ldk/structs/ChannelUpdate.java
src/main/java/org/ldk/structs/ClosingSigned.java
src/main/java/org/ldk/structs/CommitmentSigned.java
src/main/java/org/ldk/structs/CommitmentTransaction.java
src/main/java/org/ldk/structs/CommitmentUpdate.java
src/main/java/org/ldk/structs/CounterpartyChannelTransactionParameters.java
src/main/java/org/ldk/structs/DataLossProtect.java
src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java [new file with mode: 0644]
src/main/java/org/ldk/structs/DirectionalChannelInfo.java
src/main/java/org/ldk/structs/ErrorMessage.java
src/main/java/org/ldk/structs/ErroringMessageHandler.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Event.java
src/main/java/org/ldk/structs/EventsProvider.java
src/main/java/org/ldk/structs/FundingCreated.java
src/main/java/org/ldk/structs/FundingLocked.java
src/main/java/org/ldk/structs/FundingSigned.java
src/main/java/org/ldk/structs/GossipTimestampFilter.java
src/main/java/org/ldk/structs/HTLCOutputInCommitment.java
src/main/java/org/ldk/structs/HTLCUpdate.java
src/main/java/org/ldk/structs/HolderCommitmentTransaction.java
src/main/java/org/ldk/structs/IgnoringMessageHandler.java [new file with mode: 0644]
src/main/java/org/ldk/structs/InMemoryChannelKeys.java [deleted file]
src/main/java/org/ldk/structs/InMemorySigner.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Init.java
src/main/java/org/ldk/structs/InitFeatures.java
src/main/java/org/ldk/structs/KeysInterface.java
src/main/java/org/ldk/structs/KeysManager.java
src/main/java/org/ldk/structs/LightningError.java
src/main/java/org/ldk/structs/Listen.java [new file with mode: 0644]
src/main/java/org/ldk/structs/MessageSendEventsProvider.java
src/main/java/org/ldk/structs/MonitorEvent.java
src/main/java/org/ldk/structs/NetGraphMsgHandler.java
src/main/java/org/ldk/structs/NetworkGraph.java
src/main/java/org/ldk/structs/NodeAnnouncement.java
src/main/java/org/ldk/structs/NodeAnnouncementInfo.java
src/main/java/org/ldk/structs/NodeFeatures.java
src/main/java/org/ldk/structs/NodeInfo.java
src/main/java/org/ldk/structs/OpenChannel.java
src/main/java/org/ldk/structs/OutPoint.java
src/main/java/org/ldk/structs/PaymentSendFailure.java
src/main/java/org/ldk/structs/PeerHandleError.java
src/main/java/org/ldk/structs/Ping.java
src/main/java/org/ldk/structs/Pong.java
src/main/java/org/ldk/structs/QueryChannelRange.java
src/main/java/org/ldk/structs/QueryShortChannelIds.java
src/main/java/org/ldk/structs/ReplyChannelRange.java
src/main/java/org/ldk/structs/ReplyShortChannelIdsEnd.java
src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_CVec_CVec_u8ZZNoneZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ChanKeySignerDecodeErrorZ.java [deleted file]
src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_DirectionalChannelInfoDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_FundingLockedDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_InMemoryChannelKeysDecodeErrorZ.java [deleted file]
src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_NetworkGraphDecodeErrorZ.java
src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_NonePaymentSendFailureZ.java
src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_PublicKeyErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_PublicKeySecpErrorZ.java [deleted file]
src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_SecretKeyErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_SecretKeySecpErrorZ.java [deleted file]
src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_SignDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_TransactionNoneZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_TxCreationKeysErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_TxCreationKeysSecpErrorZ.java [deleted file]
src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java [new file with mode: 0644]
src/main/java/org/ldk/structs/RevokeAndACK.java
src/main/java/org/ldk/structs/Route.java
src/main/java/org/ldk/structs/RouteHint.java
src/main/java/org/ldk/structs/RouteHop.java
src/main/java/org/ldk/structs/RoutingFees.java
src/main/java/org/ldk/structs/RoutingMessageHandler.java
src/main/java/org/ldk/structs/Shutdown.java
src/main/java/org/ldk/structs/Sign.java [new file with mode: 0644]
src/main/java/org/ldk/structs/SpendableOutputDescriptor.java
src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java [new file with mode: 0644]
src/main/java/org/ldk/structs/TxCreationKeys.java
src/main/java/org/ldk/structs/UnsignedChannelAnnouncement.java
src/main/java/org/ldk/structs/UnsignedChannelUpdate.java
src/main/java/org/ldk/structs/UnsignedNodeAnnouncement.java
src/main/java/org/ldk/structs/UpdateAddHTLC.java
src/main/java/org/ldk/structs/UpdateFailHTLC.java
src/main/java/org/ldk/structs/UpdateFailMalformedHTLC.java
src/main/java/org/ldk/structs/UpdateFee.java
src/main/java/org/ldk/structs/UpdateFulfillHTLC.java
src/main/java/org/ldk/structs/UserConfig.java
src/main/java/org/ldk/structs/UtilMethods.java
src/main/java/org/ldk/structs/Watch.java
src/main/jni/bindings.c
src/main/jni/org_ldk_impl_bindings.h
src/main/jni/org_ldk_impl_bindings_LDKMonitorEvent.h [new file with mode: 0644]
src/main/jni/org_ldk_impl_bindings_LDKPaymentSendFailure.h [new file with mode: 0644]
src/test/java/org/ldk/HumanObjectPeerTest.java
src/test/java/org/ldk/ManualMsgHandlingPeerTest.java
src/test/java/org/ldk/PeerTest.java
ts/bindings.c
ts/bindings.ts
ts/enums/LDKNetwork.ts
ts/enums/LDKSecp256k1Error.ts
ts/structs/AcceptChannel.ts
ts/structs/AnnouncementSignatures.ts
ts/structs/BuiltCommitmentTransaction.ts
ts/structs/ChainMonitor.ts
ts/structs/ChainParameters.ts [new file with mode: 0644]
ts/structs/ChannelAnnouncement.ts
ts/structs/ChannelConfig.ts
ts/structs/ChannelDetails.ts
ts/structs/ChannelFeatures.ts
ts/structs/ChannelHandshakeConfig.ts
ts/structs/ChannelHandshakeLimits.ts
ts/structs/ChannelInfo.ts
ts/structs/ChannelKeys.ts [deleted file]
ts/structs/ChannelManager.ts
ts/structs/ChannelManagerReadArgs.ts
ts/structs/ChannelMessageHandler.ts
ts/structs/ChannelMonitor.ts
ts/structs/ChannelMonitorUpdate.ts
ts/structs/ChannelPublicKeys.ts
ts/structs/ChannelReestablish.ts
ts/structs/ChannelTransactionParameters.ts
ts/structs/ChannelUpdate.ts
ts/structs/ClosingSigned.ts
ts/structs/CommitmentSigned.ts
ts/structs/CommitmentTransaction.ts
ts/structs/CommitmentUpdate.ts
ts/structs/CounterpartyChannelTransactionParameters.ts
ts/structs/DataLossProtect.ts
ts/structs/DelayedPaymentOutputDescriptor.ts [new file with mode: 0644]
ts/structs/DirectionalChannelInfo.ts
ts/structs/ErrorMessage.ts
ts/structs/ErroringMessageHandler.ts [new file with mode: 0644]
ts/structs/Event.ts
ts/structs/EventsProvider.ts
ts/structs/FundingCreated.ts
ts/structs/FundingLocked.ts
ts/structs/FundingSigned.ts
ts/structs/GossipTimestampFilter.ts
ts/structs/HTLCOutputInCommitment.ts
ts/structs/HTLCUpdate.ts
ts/structs/HolderCommitmentTransaction.ts
ts/structs/IgnoringMessageHandler.ts [new file with mode: 0644]
ts/structs/InMemoryChannelKeys.ts [deleted file]
ts/structs/InMemorySigner.ts [new file with mode: 0644]
ts/structs/Init.ts
ts/structs/InitFeatures.ts
ts/structs/KeysInterface.ts
ts/structs/KeysManager.ts
ts/structs/LightningError.ts
ts/structs/Listen.ts [new file with mode: 0644]
ts/structs/MessageSendEventsProvider.ts
ts/structs/MonitorEvent.ts
ts/structs/NetGraphMsgHandler.ts
ts/structs/NetworkGraph.ts
ts/structs/NodeAnnouncement.ts
ts/structs/NodeAnnouncementInfo.ts
ts/structs/NodeFeatures.ts
ts/structs/NodeInfo.ts
ts/structs/OpenChannel.ts
ts/structs/OutPoint.ts
ts/structs/PaymentSendFailure.ts
ts/structs/PeerHandleError.ts
ts/structs/Ping.ts
ts/structs/Pong.ts
ts/structs/QueryChannelRange.ts
ts/structs/QueryShortChannelIds.ts
ts/structs/ReplyChannelRange.ts
ts/structs/ReplyShortChannelIdsEnd.ts
ts/structs/Result_AcceptChannelDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_AnnouncementSignaturesDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_CVec_CVec_u8ZZNoneZ.ts [new file with mode: 0644]
ts/structs/Result_ChanKeySignerDecodeErrorZ.ts [deleted file]
ts/structs/Result_ChannelAnnouncementDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_ChannelConfigDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_ChannelFeaturesDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_ChannelInfoDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_ChannelPublicKeysDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_ChannelTransactionParametersDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_ChannelUpdateDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_ClosingSignedDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_CommitmentSignedDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_CommitmentTransactionDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_DirectionalChannelInfoDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_FundingCreatedDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_FundingLockedDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_FundingSignedDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_HTLCUpdateDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_HolderCommitmentTransactionDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_InMemoryChannelKeysDecodeErrorZ.ts [deleted file]
ts/structs/Result_InMemorySignerDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_InitFeaturesDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_NetworkGraphDecodeErrorZ.ts
ts/structs/Result_NodeAnnouncementDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_NodeFeaturesDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_NonePaymentSendFailureZ.ts
ts/structs/Result_OpenChannelDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_OutPointDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_PublicKeyErrorZ.ts [new file with mode: 0644]
ts/structs/Result_PublicKeySecpErrorZ.ts [deleted file]
ts/structs/Result_RevokeAndACKDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_SecretKeyErrorZ.ts [new file with mode: 0644]
ts/structs/Result_SecretKeySecpErrorZ.ts [deleted file]
ts/structs/Result_ShutdownDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_SignDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_TransactionNoneZ.ts [new file with mode: 0644]
ts/structs/Result_TxCreationKeysDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_TxCreationKeysErrorZ.ts [new file with mode: 0644]
ts/structs/Result_TxCreationKeysSecpErrorZ.ts [deleted file]
ts/structs/Result_UpdateAddHTLCDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_UpdateFailHTLCDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_UpdateFeeDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/Result_UpdateFulfillHTLCDecodeErrorZ.ts [new file with mode: 0644]
ts/structs/RevokeAndACK.ts
ts/structs/Route.ts
ts/structs/RouteHint.ts
ts/structs/RouteHop.ts
ts/structs/RoutingFees.ts
ts/structs/RoutingMessageHandler.ts
ts/structs/Shutdown.ts
ts/structs/Sign.ts [new file with mode: 0644]
ts/structs/SpendableOutputDescriptor.ts
ts/structs/StaticPaymentOutputDescriptor.ts [new file with mode: 0644]
ts/structs/TxCreationKeys.ts
ts/structs/UnsignedChannelAnnouncement.ts
ts/structs/UnsignedChannelUpdate.ts
ts/structs/UnsignedNodeAnnouncement.ts
ts/structs/UpdateAddHTLC.ts
ts/structs/UpdateFailHTLC.ts
ts/structs/UpdateFailMalformedHTLC.ts
ts/structs/UpdateFee.ts
ts/structs/UpdateFulfillHTLC.ts
ts/structs/UserConfig.ts
ts/structs/UtilMethods.ts
ts/structs/Watch.ts
typescript_strings.py

index b1f0b74c3176331adba3d34d5951d5752aad651e..4d6e49b28214a0a00a08861cefa545978cf63faf 100644 (file)
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ Building
 
 A release build of the Java bindings library for Linux is available in git. Thus, the bindings should work as long as the `LD_LIBRARY_PATH` includes the top-level directory of this repository.
 
-To build the bindings locally, the bindings require some additional work which is still making its way upstream, for now it should be built against the [rust-lightning 2020-10-java-bindings-base branch on git.bitcoin.ninja](https://git.bitcoin.ninja/?p=rust-lightning;a=shortlog;h=refs/heads/2020-10-java-bindings-base). Check that branch out locally and run the `genbindings.sh` script in it to build the required binaries. Thereafter, in this repo, run the `genbindings.sh` script with the first argument pointing to the rust-lightning directory, the second the relevant JNI CFLAGS, the third argument set to `true` or `false` to indicate whether building in debug mode, and the third set to true or false to indicate if the bindings should be built with workarounds required for Android. JNI CFLAGS on debian are likely "-I/usr/lib/jvm/java-11-openjdk-amd64/include/ -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux/". When running a program linking against the library in debug mode, LD_PRELOAD should likely include the relevant `libclang_rt.asan-platform.so` path.
+To build the bindings locally, the bindings require some additional work which is still making its way upstream, for now it should be built against the [rust-lightning 2021-03-java-bindings-base branch on git.bitcoin.ninja](https://git.bitcoin.ninja/?p=rust-lightning;a=shortlog;h=refs/heads/2021-03-java-bindings-base). Check that branch out locally and run the `genbindings.sh` script in it to build the required binaries. Thereafter, in this repo, run the `genbindings.sh` script with the first argument pointing to the rust-lightning directory, the second the relevant JNI CFLAGS, the third argument set to `true` or `false` to indicate whether building in debug mode, and the third set to true or false to indicate if the bindings should be built with workarounds required for Android. JNI CFLAGS on debian are likely "-I/usr/lib/jvm/java-11-openjdk-amd64/include/ -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux/". When running a program linking against the library in debug mode, LD_PRELOAD should likely include the relevant `libclang_rt.asan-platform.so` path.
 
 Status
 ======
index 3868daebda47112766907d7053c6ac579c1fdd1b..afd19979ea297ff788d87c26c35eca9ec44d7f06 100644 (file)
@@ -32,6 +32,8 @@ class TypeMappingGenerator:
             else:
                 arr_name = "ret"
                 arr_len = ret_arr_len
+            if arr_name == "arg":
+                arr_name = "ret"
             if ty_info.c_ty == "int8_tArray":
                 (set_pfx, set_sfx) = self.consts.set_native_arr_contents(arr_name + "_arr", arr_len, ty_info)
                 ret_conv = ("int8_tArray " + arr_name + "_arr = " + self.consts.create_native_arr_call(arr_len, ty_info) + ";\n" + set_pfx, "")
@@ -70,7 +72,9 @@ class TypeMappingGenerator:
             else:
                 assert not arr_len.isdigit() # fixed length arrays not implemented
                 assert ty_info.java_ty[len(ty_info.java_ty) - 2:] == "[]"
-                conv_name = "arr_conv_" + str(len(ty_info.java_hu_ty))
+                if arr_name == "":
+                    arr_name = "ret"
+                conv_name = arr_name + "_conv_" + str(len(ty_info.java_hu_ty))
                 idxc = chr(ord('a') + (len(ty_info.java_hu_ty) % 26))
                 ty_info.subty.var_name = conv_name
                 #XXX: We'd really prefer to only ever set to False, avoiding lots of clone, but need smarter free logic
@@ -84,8 +88,6 @@ class TypeMappingGenerator:
                     # ChannelMonitors inside of vecs.
                     ty_info.subty.requires_clone = False
                 subty = self.map_type_with_info(ty_info.subty, False, None, is_free, holds_ref)
-                if arr_name == "":
-                    arr_name = "arg"
                 arg_conv = ty_info.rust_obj + " " + arr_name + "_constr;\n"
                 arg_conv = arg_conv + arr_name + "_constr." + arr_len + " = " + self.consts.get_native_arr_len_call[0] + arr_name + self.consts.get_native_arr_len_call[1] + ";\n"
                 arg_conv = arg_conv + "if (" + arr_name + "_constr." + arr_len + " > 0)\n"
@@ -120,8 +122,6 @@ class TypeMappingGenerator:
                 if ty_info.is_ptr:
                     arg_conv_cleanup = "FREE(" + arr_name + "_constr." + ty_info.arr_access + ");"
 
-                if arr_name == "arg":
-                    arr_name = "ret"
                 ret_conv = (ty_info.rust_obj + " " + arr_name + "_var = ", "")
                 if subty.ret_conv is None:
                     ret_conv = ("DUMMY", "DUMMY")
@@ -165,7 +165,7 @@ class TypeMappingGenerator:
                     elif subty.java_ty == "long":
                         from_hu_conv = ("Arrays.stream(" + arr_name + ").map(" + conv_name + " -> " + subty.from_hu_conv[0] + ").toArray()", "/* TODO 2 " + subty.java_hu_ty + "  */")
                     else:
-                        from_hu_conv = ("(" + ty_info.java_ty + ")Arrays.stream(" + arr_name + ").map(" + conv_name + " -> " + subty.from_hu_conv[0] + ").toArray()", "/* TODO 2 " + subty.java_hu_ty + "  */")
+                        from_hu_conv = ("Arrays.stream(" + arr_name + ").map(" + conv_name + " -> " + subty.from_hu_conv[0] + ").toArray(" + ty_info.java_ty + "::new)", "/* TODO 2 " + subty.java_hu_ty + "  */")
 
                 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 = arg_conv_cleanup,
index e6a17ebd5dde9756eac644d05481b8e1b6be0154..4b2ae77fe7f308cfddf7d278071c7bf6ad06a14a 100644 (file)
@@ -198,7 +198,7 @@ void __attribute__((destructor)) check_leaks() {
        size_t alloc_count = 0;
        size_t alloc_size = 0;
        for (allocation* a = allocation_ll; a != NULL; a = a->next) {
-               fprintf(stderr, "%s %p remains:\\n", a->struct_name, a->ptr);
+               fprintf(stderr, "%s %p (%lu bytes) remains:\\n", a->struct_name, a->ptr, a->alloc_len);
                backtrace_symbols_fd(a->bt, a->bt_len, STDERR_FILENO);
                fprintf(stderr, "\\n\\n");
                alloc_count++;
@@ -651,7 +651,7 @@ import java.util.Arrays;
 
                 out_c = out_c + "\tjobject obj = (*env)->NewLocalRef(env, j_calls->o);\n\tCHECK(obj != NULL);\n"
                 if fn_line.ret_ty_info.c_ty.endswith("Array"):
-                    out_c = out_c + "\t" + fn_line.ret_ty_info.c_ty + " arg = (*env)->CallObjectMethod(env, obj, j_calls->" + fn_line.fn_name + "_meth"
+                    out_c = out_c + "\t" + fn_line.ret_ty_info.c_ty + " ret = (*env)->CallObjectMethod(env, obj, j_calls->" + fn_line.fn_name + "_meth"
                 elif not fn_line.ret_ty_info.passed_as_ptr:
                     out_c = out_c + "\treturn (*env)->Call" + fn_line.ret_ty_info.java_ty.title() + "Method(env, obj, j_calls->" + fn_line.fn_name + "_meth"
                 else:
index 48816fd15ea05c3d2f77c01de0e3b7611a2941b8..1eb4cbbf63eb5f8f44484be5945b64253bf8d66a 100755 (executable)
Binary files a/liblightningjni.so and b/liblightningjni.so differ
index 2a23d7186da3a5f53d8a9dbe3748f4367afac254..f8e3484b7e0b7b74779833f2a1e232a79dd13adc 100644 (file)
@@ -71,8 +71,7 @@ public class ChannelManagerConstructor {
         channel_monitors = new TwoTuple[0];
         channel_manager_latest_block_hash = null;
         this.chain_watch = chain_watch;
-        // Note that current_blockchain_tip_hash will be required in a future version but is currently unused.
-        channel_manager = ChannelManager.constructor_new(network, fee_estimator, chain_watch, tx_broadcaster, logger, keys_interface, config, current_blockchain_tip_height);
+        channel_manager = ChannelManager.constructor_new(fee_estimator, chain_watch, tx_broadcaster, logger, keys_interface, config, network, current_blockchain_tip_hash, current_blockchain_tip_height);
     }
 
     /**
index 5dc35775421623716b7ae9fed06a11acd6888cec..f764ed6b42aec2d1d9102a4a16d744d919f71db8 100644 (file)
@@ -4,6 +4,7 @@ public enum LDKNetwork {
        LDKNetwork_Bitcoin,
        LDKNetwork_Testnet,
        LDKNetwork_Regtest,
+       LDKNetwork_Signet,
        ; static native void init();
        static { init(); }
 }
\ No newline at end of file
index 60c6de3240a1cbcd7060eaafacca72658ce2d59b..7bfe141532be0da0500b87127a4d291ba140fccf 100644 (file)
@@ -8,8 +8,8 @@ public enum LDKSecp256k1Error {
        LDKSecp256k1Error_InvalidSecretKey,
        LDKSecp256k1Error_InvalidRecoveryId,
        LDKSecp256k1Error_InvalidTweak,
+       LDKSecp256k1Error_TweakCheckFailed,
        LDKSecp256k1Error_NotEnoughMemory,
-       LDKSecp256k1Error_CallbackPanicked,
        ; static native void init();
        static { init(); }
 }
\ No newline at end of file
index 6f9bd8d5f73b83b50227e8aa777b02221d06b1f7..6ae3d22f0059393d1012f2c09a7590ee9a549c5b 100644 (file)
@@ -37,36 +37,45 @@ public class bindings {
        static { LDKNetwork.values(); /* Force enum statics to run */ }
        static { LDKSecp256k1Error.values(); /* Force enum statics to run */ }
        public static native long LDKCVec_u8Z_new(byte[] elems);
-       public static native long LDKC2Tuple_u64u64Z_new(long a, long b);
-       public static native long LDKC2Tuple_u64u64Z_get_a(long ptr);
-       public static native long LDKC2Tuple_u64u64Z_get_b(long ptr);
-       public static class LDKSpendableOutputDescriptor {
-               private LDKSpendableOutputDescriptor() {}
-               public final static class StaticOutput extends LDKSpendableOutputDescriptor {
-                       public long outpoint;
-                       public long output;
-                       StaticOutput(long outpoint, long output) { this.outpoint = outpoint; this.output = output; }
-               }
-               public final static class DynamicOutputP2WSH extends LDKSpendableOutputDescriptor {
-                       public long outpoint;
-                       public byte[] per_commitment_point;
-                       public short to_self_delay;
-                       public long output;
-                       public long key_derivation_params;
-                       public byte[] revocation_pubkey;
-                       DynamicOutputP2WSH(long outpoint, byte[] per_commitment_point, short to_self_delay, long output, long key_derivation_params, byte[] revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
-               }
-               public final static class StaticOutputCounterpartyPayment extends LDKSpendableOutputDescriptor {
-                       public long outpoint;
-                       public long output;
-                       public long key_derivation_params;
-                       StaticOutputCounterpartyPayment(long outpoint, long output, long key_derivation_params) { this.outpoint = outpoint; this.output = output; this.key_derivation_params = key_derivation_params; }
-               }
-               static native void init();
-       }
-       static { LDKSpendableOutputDescriptor.init(); }
-       public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
-       public static native long LDKCVec_SpendableOutputDescriptorZ_new(long[] elems);
+       public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
+       public static native byte[] LDKCResult_SecretKeyErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
+       public static native byte[] LDKCResult_PublicKeyErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
+       public static native long LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
+       public static native long LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
+       public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
+       public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
+       public static native byte[][] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
+       public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
        public static class LDKErrorAction {
                private LDKErrorAction() {}
                public final static class DisconnectPeer extends LDKErrorAction {
@@ -198,6 +207,125 @@ public class bindings {
        static { LDKMessageSendEvent.init(); }
        public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
        public static native long LDKCVec_MessageSendEventZ_new(long[] elems);
+       public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
+       public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
+       public static native long LDKCResult_boolLightningErrorZ_get_err(long arg);
+       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
+       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
+       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
+       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
+       public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(long[] elems);
+       public static native long LDKCVec_NodeAnnouncementZ_new(long[] elems);
+       public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
+       public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NoneLightningErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
+       public static native byte[] LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
+       public static native long LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
+       public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
+       public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
+       public static native long LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
+       public static class LDKNetAddress {
+               private LDKNetAddress() {}
+               public final static class IPv4 extends LDKNetAddress {
+                       public byte[] addr;
+                       public short port;
+                       IPv4(byte[] addr, short port) { this.addr = addr; this.port = port; }
+               }
+               public final static class IPv6 extends LDKNetAddress {
+                       public byte[] addr;
+                       public short port;
+                       IPv6(byte[] addr, short port) { this.addr = addr; this.port = port; }
+               }
+               public final static class OnionV2 extends LDKNetAddress {
+                       public byte[] addr;
+                       public short port;
+                       OnionV2(byte[] addr, short port) { this.addr = addr; this.port = port; }
+               }
+               public final static class OnionV3 extends LDKNetAddress {
+                       public byte[] ed25519_pubkey;
+                       public short checksum;
+                       public byte version;
+                       public short port;
+                       OnionV3(byte[] ed25519_pubkey, short checksum, byte version, short port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
+               }
+               static native void init();
+       }
+       static { LDKNetAddress.init(); }
+       public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
+       public static native long LDKCVec_NetAddressZ_new(long[] elems);
+       public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_u64Z_new(long[] elems);
+       public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
+       public static native long LDKC2Tuple_usizeTransactionZ_new(long a, byte[] b);
+       public static native long LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
+       public static native byte[] LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
+       public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(long[] elems);
+       public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
+       public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
+       public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
+       public static class LDKMonitorEvent {
+               private LDKMonitorEvent() {}
+               public final static class HTLCEvent extends LDKMonitorEvent {
+                       HTLCEvent() { }
+               }
+               public final static class CommitmentTxBroadcasted extends LDKMonitorEvent {
+                       CommitmentTxBroadcasted() { }
+               }
+               static native void init();
+       }
+       static { LDKMonitorEvent.init(); }
+       public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
+       public static native long LDKCVec_MonitorEventZ_new(long[] elems);
+       public static class LDKSpendableOutputDescriptor {
+               private LDKSpendableOutputDescriptor() {}
+               public final static class StaticOutput extends LDKSpendableOutputDescriptor {
+                       public long outpoint;
+                       public long output;
+                       StaticOutput(long outpoint, long output) { this.outpoint = outpoint; this.output = output; }
+               }
+               public final static class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
+                       DelayedPaymentOutput() { }
+               }
+               public final static class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
+                       StaticPaymentOutput() { }
+               }
+               static native void init();
+       }
+       static { LDKSpendableOutputDescriptor.init(); }
+       public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
+       public static native long LDKCVec_SpendableOutputDescriptorZ_new(long[] elems);
        public static class LDKEvent {
                private LDKEvent() {}
                public final static class FundingGenerationReady extends LDKEvent {
@@ -240,17 +368,15 @@ public class bindings {
        static { LDKEvent.init(); }
        public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
        public static native long LDKCVec_EventZ_new(long[] elems);
-       public static native long LDKC2Tuple_usizeTransactionZ_new(long a, byte[] b);
-       public static native long LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
-       public static native byte[] LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
-       public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(long[] elems);
-       public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
-       public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
-       public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
-       public static native long LDKCVec_MonitorEventZ_new(long[] elems);
+       public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
        public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
        public static native long LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
@@ -274,10 +400,10 @@ public class bindings {
        public static native boolean LDKCResult_SignatureNoneZ_result_ok(long arg);
        public static native byte[] LDKCResult_SignatureNoneZ_get_ok(long arg);
        public static native void LDKCResult_SignatureNoneZ_get_err(long arg);
-       public interface LDKChannelKeys {
+       public interface LDKSign {
                 byte[] get_per_commitment_point(long idx);
                 byte[] release_commitment_secret(long idx);
-                long key_derivation_params();
+                byte[] channel_keys_id();
                 long sign_counterparty_commitment(long commitment_tx);
                 long sign_holder_commitment_and_htlcs(long commitment_tx);
                 long sign_justice_transaction(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
@@ -287,46 +413,37 @@ public class bindings {
                 void ready_channel(long channel_parameters);
                 byte[] write();
        }
-       public static native long LDKChannelKeys_new(LDKChannelKeys impl, long pubkeys);
-       // LDKPublicKey ChannelKeys_get_per_commitment_point LDKChannelKeys* this_arg, uint64_t idx
-       public static native byte[] ChannelKeys_get_per_commitment_point(long this_arg, long idx);
-       // LDKThirtyTwoBytes ChannelKeys_release_commitment_secret LDKChannelKeys* this_arg, uint64_t idx
-       public static native byte[] ChannelKeys_release_commitment_secret(long this_arg, long idx);
-       // LDKC2Tuple_u64u64Z ChannelKeys_key_derivation_params LDKChannelKeys* this_arg
-       public static native long ChannelKeys_key_derivation_params(long this_arg);
-       // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ChannelKeys_sign_counterparty_commitment LDKChannelKeys* this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
-       public static native long ChannelKeys_sign_counterparty_commitment(long this_arg, long commitment_tx);
-       // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ChannelKeys_sign_holder_commitment_and_htlcs LDKChannelKeys* this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
-       public static native long ChannelKeys_sign_holder_commitment_and_htlcs(long this_arg, long commitment_tx);
-       // LDKCResult_SignatureNoneZ ChannelKeys_sign_justice_transaction LDKChannelKeys* this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
-       public static native long ChannelKeys_sign_justice_transaction(long this_arg, byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
-       // LDKCResult_SignatureNoneZ ChannelKeys_sign_counterparty_htlc_transaction LDKChannelKeys* this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
-       public static native long ChannelKeys_sign_counterparty_htlc_transaction(long this_arg, byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
-       // LDKCResult_SignatureNoneZ ChannelKeys_sign_closing_transaction LDKChannelKeys* this_arg, struct LDKTransaction closing_tx
-       public static native long ChannelKeys_sign_closing_transaction(long this_arg, byte[] closing_tx);
-       // LDKCResult_SignatureNoneZ ChannelKeys_sign_channel_announcement LDKChannelKeys* this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
-       public static native long ChannelKeys_sign_channel_announcement(long this_arg, long msg);
-       // void ChannelKeys_ready_channel LDKChannelKeys* this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
-       public static native void ChannelKeys_ready_channel(long this_arg, long channel_parameters);
-       // LDKCVec_u8Z ChannelKeys_write LDKChannelKeys* this_arg
-       public static native byte[] ChannelKeys_write(long this_arg);
-       // LDKChannelPublicKeys ChannelKeys_get_pubkeys LDKChannelKeys* this_arg
-       public static native long ChannelKeys_get_pubkeys(long this_arg);
+       public static native long LDKSign_new(LDKSign impl, long pubkeys);
+       // LDKPublicKey Sign_get_per_commitment_point LDKSign* this_arg, uint64_t idx
+       public static native byte[] Sign_get_per_commitment_point(long this_arg, long idx);
+       // LDKThirtyTwoBytes Sign_release_commitment_secret LDKSign* this_arg, uint64_t idx
+       public static native byte[] Sign_release_commitment_secret(long this_arg, long idx);
+       // LDKThirtyTwoBytes Sign_channel_keys_id LDKSign* this_arg
+       public static native byte[] Sign_channel_keys_id(long this_arg);
+       // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_counterparty_commitment LDKSign* this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
+       public static native long Sign_sign_counterparty_commitment(long this_arg, long commitment_tx);
+       // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_holder_commitment_and_htlcs LDKSign* this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
+       public static native long Sign_sign_holder_commitment_and_htlcs(long this_arg, long commitment_tx);
+       // LDKCResult_SignatureNoneZ Sign_sign_justice_transaction LDKSign* this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
+       public static native long Sign_sign_justice_transaction(long this_arg, byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc);
+       // LDKCResult_SignatureNoneZ Sign_sign_counterparty_htlc_transaction LDKSign* this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
+       public static native long Sign_sign_counterparty_htlc_transaction(long this_arg, byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc);
+       // LDKCResult_SignatureNoneZ Sign_sign_closing_transaction LDKSign* this_arg, struct LDKTransaction closing_tx
+       public static native long Sign_sign_closing_transaction(long this_arg, byte[] closing_tx);
+       // LDKCResult_SignatureNoneZ Sign_sign_channel_announcement LDKSign* this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
+       public static native long Sign_sign_channel_announcement(long this_arg, long msg);
+       // void Sign_ready_channel LDKSign* this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
+       public static native void Sign_ready_channel(long this_arg, long channel_parameters);
+       // LDKCVec_u8Z Sign_write LDKSign* this_arg
+       public static native byte[] Sign_write(long this_arg);
+       // LDKChannelPublicKeys Sign_get_pubkeys LDKSign* this_arg
+       public static native long Sign_get_pubkeys(long this_arg);
        public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
        public static native byte[] LDKC2Tuple_BlockHashChannelMonitorZ_get_a(long ptr);
        public static native long LDKC2Tuple_BlockHashChannelMonitorZ_get_b(long ptr);
        public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_ChanKeySignerDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
        public static native long LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
        public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
@@ -359,39 +476,30 @@ public class bindings {
        public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
        public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
        public static native long LDKCResult_NoneAPIErrorZ_get_err(long arg);
+       public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(long[] elems);
+       public static native long LDKCVec_APIErrorZ_new(long[] elems);
        public static native long LDKCVec_ChannelDetailsZ_new(long[] elems);
-       public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
-       public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
-       public static native long LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
-       public static class LDKNetAddress {
-               private LDKNetAddress() {}
-               public final static class IPv4 extends LDKNetAddress {
-                       public byte[] addr;
-                       public short port;
-                       IPv4(byte[] addr, short port) { this.addr = addr; this.port = port; }
+       public static class LDKPaymentSendFailure {
+               private LDKPaymentSendFailure() {}
+               public final static class ParameterError extends LDKPaymentSendFailure {
+                       ParameterError() { }
                }
-               public final static class IPv6 extends LDKNetAddress {
-                       public byte[] addr;
-                       public short port;
-                       IPv6(byte[] addr, short port) { this.addr = addr; this.port = port; }
+               public final static class PathParameterError extends LDKPaymentSendFailure {
+                       PathParameterError() { }
                }
-               public final static class OnionV2 extends LDKNetAddress {
-                       public byte[] addr;
-                       public short port;
-                       OnionV2(byte[] addr, short port) { this.addr = addr; this.port = port; }
+               public final static class AllFailedRetrySafe extends LDKPaymentSendFailure {
+                       AllFailedRetrySafe() { }
                }
-               public final static class OnionV3 extends LDKNetAddress {
-                       public byte[] ed25519_pubkey;
-                       public short checksum;
-                       public byte version;
-                       public short port;
-                       OnionV3(byte[] ed25519_pubkey, short checksum, byte version, short port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
+               public final static class PartialFailure extends LDKPaymentSendFailure {
+                       PartialFailure() { }
                }
                static native void init();
        }
-       static { LDKNetAddress.init(); }
-       public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
-       public static native long LDKCVec_NetAddressZ_new(long[] elems);
+       static { LDKPaymentSendFailure.init(); }
+       public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
+       public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
+       public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
+       public static native long LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
        public static native long LDKCVec_ChannelMonitorZ_new(long[] elems);
        public interface LDKWatch {
                 long watch_channel(long funding_txo, long monitor);
@@ -411,11 +519,14 @@ public class bindings {
        public static native long LDKBroadcasterInterface_new(LDKBroadcasterInterface impl);
        // void BroadcasterInterface_broadcast_transaction LDKBroadcasterInterface* this_arg, struct LDKTransaction tx
        public static native void BroadcasterInterface_broadcast_transaction(long this_arg, byte[] tx);
+       public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_SignDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_SignDecodeErrorZ_get_err(long arg);
        public interface LDKKeysInterface {
                 byte[] get_node_secret();
                 byte[] get_destination_script();
                 byte[] get_shutdown_pubkey();
-                long get_channel_keys(boolean inbound, long channel_value_satoshis);
+                long get_channel_signer(boolean inbound, long channel_value_satoshis);
                 byte[] get_secure_random_bytes();
                 long read_chan_signer(byte[] reader);
        }
@@ -426,11 +537,11 @@ public class bindings {
        public static native byte[] KeysInterface_get_destination_script(long this_arg);
        // LDKPublicKey KeysInterface_get_shutdown_pubkey LDKKeysInterface* this_arg
        public static native byte[] KeysInterface_get_shutdown_pubkey(long this_arg);
-       // LDKChannelKeys KeysInterface_get_channel_keys LDKKeysInterface* this_arg, bool inbound, uint64_t channel_value_satoshis
-       public static native long KeysInterface_get_channel_keys(long this_arg, boolean inbound, long channel_value_satoshis);
+       // LDKSign KeysInterface_get_channel_signer LDKKeysInterface* this_arg, bool inbound, uint64_t channel_value_satoshis
+       public static native long KeysInterface_get_channel_signer(long this_arg, boolean inbound, long channel_value_satoshis);
        // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface* this_arg
        public static native byte[] KeysInterface_get_secure_random_bytes(long this_arg);
-       // LDKCResult_ChanKeySignerDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
+       // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
        public static native long KeysInterface_read_chan_signer(long this_arg, byte[] reader);
        public interface LDKFeeEstimator {
                 int get_est_sat_per_1000_weight(LDKConfirmationTarget confirmation_target);
@@ -448,35 +559,88 @@ public class bindings {
        public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
+       public static native byte[][] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
+       public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
+       public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_TxOutZ_new(long[] elems);
+       public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
+       public static native byte[] LDKCResult_TransactionNoneZ_get_ok(long arg);
+       public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
+       public static native long LDKCVec_RouteHopZ_new(long[] elems);
+       public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_RouteDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_RouteHintZ_new(long[] elems);
+       public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
+       public static native long LDKCResult_RouteLightningErrorZ_get_ok(long arg);
+       public static native long LDKCResult_RouteLightningErrorZ_get_err(long arg);
        public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
        public static native long LDKCResult_NetAddressu8Z_get_ok(long arg);
        public static native byte LDKCResult_NetAddressu8Z_get_err(long arg);
        public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
-       public static native long LDKCVec_u64Z_new(long[] elems);
        public static native long LDKCVec_UpdateAddHTLCZ_new(long[] elems);
        public static native long LDKCVec_UpdateFulfillHTLCZ_new(long[] elems);
        public static native long LDKCVec_UpdateFailHTLCZ_new(long[] elems);
        public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(long[] elems);
-       public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
-       public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
-       public static native long LDKCResult_boolLightningErrorZ_get_err(long arg);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
-       public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(long[] elems);
-       public static native long LDKCVec_NodeAnnouncementZ_new(long[] elems);
-       public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
-       public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
-       public static native long LDKCResult_NoneLightningErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_InitDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_InitDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_PingDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_PingDecodeErrorZ_get_err(long arg);
@@ -486,15 +650,24 @@ public class bindings {
        public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
+       public static native long LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
+       public static native long LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
@@ -510,50 +683,6 @@ public class bindings {
        public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
        public static native long LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
        public static native long LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
-       public static native byte[] LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
-       public static native long LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
-       public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
-       public static native long LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
-       public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
-       public static native long LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_SecretKeySecpErrorZ_result_ok(long arg);
-       public static native byte[] LDKCResult_SecretKeySecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_SecretKeySecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_PublicKeySecpErrorZ_result_ok(long arg);
-       public static native byte[] LDKCResult_PublicKeySecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_PublicKeySecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_TxCreationKeysSecpErrorZ_result_ok(long arg);
-       public static native long LDKCResult_TxCreationKeysSecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_TxCreationKeysSecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
-       public static native long LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
-       public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
-       public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
-       public static native byte[][] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
-       public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
-       public static native long LDKCVec_RouteHopZ_new(long[] elems);
-       public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_RouteDecodeErrorZ_get_err(long arg);
-       public static native long LDKCVec_RouteHintZ_new(long[] elems);
-       public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
-       public static native long LDKCResult_RouteLightningErrorZ_get_ok(long arg);
-       public static native long LDKCResult_RouteLightningErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
-       public static native long LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
-       public static native long LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
        public interface LDKMessageSendEventsProvider {
                 long[] get_and_clear_pending_msg_events();
        }
@@ -572,6 +701,15 @@ public class bindings {
        public static native long LDKAccess_new(LDKAccess impl);
        // LDKCResult_TxOutAccessErrorZ Access_get_utxo LDKAccess* this_arg, const uint8_t (*genesis_hash)[32], uint64_t short_channel_id
        public static native long Access_get_utxo(long this_arg, byte[] genesis_hash, long short_channel_id);
+       public interface LDKListen {
+                void block_connected(byte[] block, int height);
+                void block_disconnected(byte[] header, int height);
+       }
+       public static native long LDKListen_new(LDKListen impl);
+       // void Listen_block_connected LDKListen* this_arg, struct LDKu8slice block, uint32_t height
+       public static native void Listen_block_connected(long this_arg, byte[] block, int height);
+       // void Listen_block_disconnected LDKListen* this_arg, const uint8_t (*header)[80], uint32_t height
+       public static native void Listen_block_disconnected(long this_arg, byte[] header, int height);
        public interface LDKFilter {
                 void register_tx(byte[] txid, byte[] script_pubkey);
                 void register_output(long outpoint, byte[] script_pubkey);
@@ -596,7 +734,7 @@ public class bindings {
                 void handle_funding_created(byte[] their_node_id, long msg);
                 void handle_funding_signed(byte[] their_node_id, long msg);
                 void handle_funding_locked(byte[] their_node_id, long msg);
-                void handle_shutdown(byte[] their_node_id, long msg);
+                void handle_shutdown(byte[] their_node_id, long their_features, long msg);
                 void handle_closing_signed(byte[] their_node_id, long msg);
                 void handle_update_add_htlc(byte[] their_node_id, long msg);
                 void handle_update_fulfill_htlc(byte[] their_node_id, long msg);
@@ -622,8 +760,8 @@ public class bindings {
        public static native void ChannelMessageHandler_handle_funding_signed(long this_arg, byte[] their_node_id, long msg);
        // void ChannelMessageHandler_handle_funding_locked LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKFundingLocked *NONNULL_PTR msg
        public static native void ChannelMessageHandler_handle_funding_locked(long this_arg, byte[] their_node_id, long msg);
-       // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKShutdown *NONNULL_PTR msg
-       public static native void ChannelMessageHandler_handle_shutdown(long this_arg, byte[] their_node_id, long msg);
+       // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInitFeatures *NONNULL_PTR their_features, const struct LDKShutdown *NONNULL_PTR msg
+       public static native void ChannelMessageHandler_handle_shutdown(long this_arg, byte[] their_node_id, long their_features, long msg);
        // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
        public static native void ChannelMessageHandler_handle_closing_signed(long this_arg, byte[] their_node_id, long msg);
        // void ChannelMessageHandler_handle_update_add_htlc LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKUpdateAddHTLC *NONNULL_PTR msg
@@ -705,35 +843,281 @@ public class bindings {
        public static native void TxOut_free(long _res);
        // struct LDKTxOut TxOut_clone(const struct LDKTxOut *NONNULL_PTR orig);
        public static native long TxOut_clone(long orig);
-       // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
-       public static native void CVec_SpendableOutputDescriptorZ_free(long[] _res);
+       // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
+       public static native long CResult_SecretKeyErrorZ_ok(byte[] o);
+       // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
+       public static native long CResult_SecretKeyErrorZ_err(LDKSecp256k1Error e);
+       // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
+       public static native void CResult_SecretKeyErrorZ_free(long _res);
+       // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
+       public static native long CResult_PublicKeyErrorZ_ok(byte[] o);
+       // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
+       public static native long CResult_PublicKeyErrorZ_err(LDKSecp256k1Error e);
+       // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
+       public static native void CResult_PublicKeyErrorZ_free(long _res);
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
+       public static native long CResult_TxCreationKeysDecodeErrorZ_ok(long o);
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_TxCreationKeysDecodeErrorZ_err(long e);
+       // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
+       public static native void CResult_TxCreationKeysDecodeErrorZ_free(long _res);
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_TxCreationKeysDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
+       public static native long CResult_ChannelPublicKeysDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelPublicKeysDecodeErrorZ_err(long e);
+       // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
+       public static native void CResult_ChannelPublicKeysDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelPublicKeysDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
+       public static native long CResult_TxCreationKeysErrorZ_ok(long o);
+       // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
+       public static native long CResult_TxCreationKeysErrorZ_err(LDKSecp256k1Error e);
+       // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
+       public static native void CResult_TxCreationKeysErrorZ_free(long _res);
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
+       public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(long o);
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_err(long e);
+       // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
+       public static native void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(long _res);
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
+       public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(long o);
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(long e);
+       // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
+       public static native void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(long _res);
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
+       public static native long CResult_ChannelTransactionParametersDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelTransactionParametersDecodeErrorZ_err(long e);
+       // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
+       public static native void CResult_ChannelTransactionParametersDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelTransactionParametersDecodeErrorZ_clone(long orig);
+       // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
+       public static native void CVec_SignatureZ_free(byte[][] _res);
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
+       public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_ok(long o);
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_err(long e);
+       // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
+       public static native void CResult_HolderCommitmentTransactionDecodeErrorZ_free(long _res);
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_HolderCommitmentTransactionDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
+       public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(long o);
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_err(long e);
+       // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
+       public static native void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(long _res);
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
+       public static native long CResult_CommitmentTransactionDecodeErrorZ_ok(long o);
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_CommitmentTransactionDecodeErrorZ_err(long e);
+       // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
+       public static native void CResult_CommitmentTransactionDecodeErrorZ_free(long _res);
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CommitmentTransactionDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
+       public static native long CResult_TrustedCommitmentTransactionNoneZ_ok(long o);
+       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
+       public static native long CResult_TrustedCommitmentTransactionNoneZ_err();
+       // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
+       public static native void CResult_TrustedCommitmentTransactionNoneZ_free(long _res);
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
+       public static native long CResult_CVec_SignatureZNoneZ_ok(byte[][] o);
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
+       public static native long CResult_CVec_SignatureZNoneZ_err();
+       // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
+       public static native void CResult_CVec_SignatureZNoneZ_free(long _res);
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
+       public static native long CResult_CVec_SignatureZNoneZ_clone(long orig);
        // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
        public static native void CVec_MessageSendEventZ_free(long[] _res);
-       // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
-       public static native void CVec_EventZ_free(long[] _res);
-       // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
-       public static native void C2Tuple_usizeTransactionZ_free(long _res);
-       // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
-       public static native long C2Tuple_usizeTransactionZ_new(long a, byte[] b);
-       // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
-       public static native void CVec_C2Tuple_usizeTransactionZZ_free(long[] _res);
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
-       public static native long CResult_NoneChannelMonitorUpdateErrZ_ok();
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
-       public static native long CResult_NoneChannelMonitorUpdateErrZ_err(LDKChannelMonitorUpdateErr e);
-       // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
-       public static native void CResult_NoneChannelMonitorUpdateErrZ_free(long _res);
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
-       public static native long CResult_NoneChannelMonitorUpdateErrZ_clone(long orig);
-       // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
-       public static native void CVec_MonitorEventZ_free(long[] _res);
-       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
-       public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_ok(long o);
-       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_err(long e);
-       // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
-       public static native void CResult_ChannelMonitorUpdateDecodeErrorZ_free(long _res);
-       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
+       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
+       public static native long CResult_boolLightningErrorZ_ok(boolean o);
+       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
+       public static native long CResult_boolLightningErrorZ_err(long e);
+       // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
+       public static native void CResult_boolLightningErrorZ_free(long _res);
+       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
+       public static native long CResult_boolLightningErrorZ_clone(long orig);
+       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
+       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(long orig);
+       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
+       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
+       // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
+       public static native void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(long _res);
+       // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
+       public static native void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(long[] _res);
+       // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
+       public static native void CVec_NodeAnnouncementZ_free(long[] _res);
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
+       public static native long CResult_NoneLightningErrorZ_ok();
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
+       public static native long CResult_NoneLightningErrorZ_err(long e);
+       // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
+       public static native void CResult_NoneLightningErrorZ_free(long _res);
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NoneLightningErrorZ_clone(long orig);
+       // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
+       public static native void CVec_PublicKeyZ_free(byte[][] _res);
+       // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
+       public static native void CVec_u8Z_free(byte[] _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);
+       public static native long CResult_CVec_u8ZPeerHandleErrorZ_err(long e);
+       // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
+       public static native void CResult_CVec_u8ZPeerHandleErrorZ_free(long _res);
+       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CVec_u8ZPeerHandleErrorZ_clone(long orig);
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
+       public static native long CResult_NonePeerHandleErrorZ_ok();
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       public static native long CResult_NonePeerHandleErrorZ_err(long e);
+       // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
+       public static native void CResult_NonePeerHandleErrorZ_free(long _res);
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NonePeerHandleErrorZ_clone(long orig);
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
+       public static native long CResult_boolPeerHandleErrorZ_ok(boolean o);
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       public static native long CResult_boolPeerHandleErrorZ_err(long e);
+       // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
+       public static native void CResult_boolPeerHandleErrorZ_free(long _res);
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
+       public static native long CResult_boolPeerHandleErrorZ_clone(long orig);
+       // 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);
+       public static native long CResult_InitFeaturesDecodeErrorZ_err(long e);
+       // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
+       public static native void CResult_InitFeaturesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
+       public static native long CResult_NodeFeaturesDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NodeFeaturesDecodeErrorZ_err(long e);
+       // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
+       public static native void CResult_NodeFeaturesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
+       public static native long CResult_ChannelFeaturesDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelFeaturesDecodeErrorZ_err(long e);
+       // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
+       public static native void CResult_ChannelFeaturesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
+       public static native long CResult_ChannelConfigDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelConfigDecodeErrorZ_err(long e);
+       // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
+       public static native void CResult_ChannelConfigDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelConfigDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
+       public static native long CResult_DirectionalChannelInfoDecodeErrorZ_ok(long o);
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_DirectionalChannelInfoDecodeErrorZ_err(long e);
+       // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
+       public static native void CResult_DirectionalChannelInfoDecodeErrorZ_free(long _res);
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_DirectionalChannelInfoDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
+       public static native long CResult_ChannelInfoDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelInfoDecodeErrorZ_err(long e);
+       // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
+       public static native void CResult_ChannelInfoDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelInfoDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
+       public static native long CResult_RoutingFeesDecodeErrorZ_ok(long o);
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_RoutingFeesDecodeErrorZ_err(long e);
+       // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
+       public static native void CResult_RoutingFeesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RoutingFeesDecodeErrorZ_clone(long orig);
+       // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
+       public static native void CVec_NetAddressZ_free(long[] _res);
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
+       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_err(long e);
+       // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
+       public static native void CResult_NodeAnnouncementInfoDecodeErrorZ_free(long _res);
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_clone(long orig);
+       // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
+       public static native void CVec_u64Z_free(long[] _res);
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
+       public static native long CResult_NodeInfoDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NodeInfoDecodeErrorZ_err(long e);
+       // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
+       public static native void CResult_NodeInfoDecodeErrorZ_free(long _res);
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NodeInfoDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
+       public static native long CResult_NetworkGraphDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NetworkGraphDecodeErrorZ_err(long e);
+       // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
+       public static native void CResult_NetworkGraphDecodeErrorZ_free(long _res);
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NetworkGraphDecodeErrorZ_clone(long orig);
+       // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
+       public static native long C2Tuple_usizeTransactionZ_new(long a, byte[] b);
+       // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
+       public static native void C2Tuple_usizeTransactionZ_free(long _res);
+       // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
+       public static native void CVec_C2Tuple_usizeTransactionZZ_free(long[] _res);
+       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
+       public static native long CResult_NoneChannelMonitorUpdateErrZ_ok();
+       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
+       public static native long CResult_NoneChannelMonitorUpdateErrZ_err(LDKChannelMonitorUpdateErr e);
+       // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
+       public static native void CResult_NoneChannelMonitorUpdateErrZ_free(long _res);
+       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
+       public static native long CResult_NoneChannelMonitorUpdateErrZ_clone(long orig);
+       // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
+       public static native void CVec_MonitorEventZ_free(long[] _res);
+       // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
+       public static native void CVec_EventZ_free(long[] _res);
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
+       public static native long CResult_OutPointDecodeErrorZ_ok(long o);
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_OutPointDecodeErrorZ_err(long e);
+       // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
+       public static native void CResult_OutPointDecodeErrorZ_free(long _res);
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_OutPointDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
+       public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_err(long e);
+       // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
+       public static native void CResult_ChannelMonitorUpdateDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelMonitorUpdateDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
+       public static native long CResult_HTLCUpdateDecodeErrorZ_ok(long o);
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_HTLCUpdateDecodeErrorZ_err(long e);
+       // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
+       public static native void CResult_HTLCUpdateDecodeErrorZ_free(long _res);
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_HTLCUpdateDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
        public static native long CResult_NoneMonitorUpdateErrorZ_ok();
        // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
        public static native long CResult_NoneMonitorUpdateErrorZ_err(long e);
@@ -741,88 +1125,40 @@ public class bindings {
        public static native void CResult_NoneMonitorUpdateErrorZ_free(long _res);
        // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
        public static native long CResult_NoneMonitorUpdateErrorZ_clone(long orig);
-       // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
-       public static native void C2Tuple_OutPointScriptZ_free(long _res);
+       // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
+       public static native long C2Tuple_OutPointScriptZ_clone(long orig);
        // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
        public static native long C2Tuple_OutPointScriptZ_new(long a, byte[] b);
+       // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
+       public static native void C2Tuple_OutPointScriptZ_free(long _res);
        // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
        public static native void CVec_TransactionZ_free(byte[][] _res);
        // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
        public static native long C2Tuple_u32TxOutZ_clone(long orig);
-       // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
-       public static native void C2Tuple_u32TxOutZ_free(long _res);
        // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
        public static native long C2Tuple_u32TxOutZ_new(int a, long b);
+       // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
+       public static native void C2Tuple_u32TxOutZ_free(long _res);
        // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
        public static native void CVec_C2Tuple_u32TxOutZZ_free(long[] _res);
-       // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
-       public static native void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(long _res);
        // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
        public static native long C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(byte[] a, long[] b);
+       // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
+       public static native void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(long _res);
        // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
        public static native void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(long[] _res);
-       // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
-       public static native void C2Tuple_BlockHashChannelMonitorZ_free(long _res);
        // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
        public static native long C2Tuple_BlockHashChannelMonitorZ_new(byte[] a, long b);
+       // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
+       public static native void C2Tuple_BlockHashChannelMonitorZ_free(long _res);
        // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
        public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(long o);
        // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(long e);
        // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
        public static native void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(long _res);
-       // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_clone(const struct LDKC2Tuple_u64u64Z *NONNULL_PTR orig);
-       public static native long C2Tuple_u64u64Z_clone(long orig);
-       // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
-       public static native void C2Tuple_u64u64Z_free(long _res);
-       // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
-       public static native long C2Tuple_u64u64Z_new(long a, long b);
-       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
-       public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_ok(long o);
-       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_err(long e);
-       // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
-       public static native void CResult_SpendableOutputDescriptorDecodeErrorZ_free(long _res);
-       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
-       public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_clone(long orig);
-       // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
-       public static native void CVec_SignatureZ_free(byte[][] _res);
-       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
-       public static native long C2Tuple_SignatureCVec_SignatureZZ_clone(long orig);
-       // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
-       public static native void C2Tuple_SignatureCVec_SignatureZZ_free(long _res);
-       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
-       public static native long C2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b);
-       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
-       public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(long o);
-       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
-       public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
-       // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
-       public static native void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(long _res);
-       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
-       public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(long orig);
-       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
-       public static native long CResult_SignatureNoneZ_ok(byte[] o);
-       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
-       public static native long CResult_SignatureNoneZ_err();
-       // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
-       public static native void CResult_SignatureNoneZ_free(long _res);
-       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
-       public static native long CResult_SignatureNoneZ_clone(long orig);
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_ok(struct LDKChannelKeys o);
-       public static native long CResult_ChanKeySignerDecodeErrorZ_ok(long o);
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_ChanKeySignerDecodeErrorZ_err(long e);
-       // void CResult_ChanKeySignerDecodeErrorZ_free(struct LDKCResult_ChanKeySignerDecodeErrorZ _res);
-       public static native void CResult_ChanKeySignerDecodeErrorZ_free(long _res);
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_clone(const struct LDKCResult_ChanKeySignerDecodeErrorZ *NONNULL_PTR orig);
-       public static native long CResult_ChanKeySignerDecodeErrorZ_clone(long orig);
-       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_ok(struct LDKInMemoryChannelKeys o);
-       public static native long CResult_InMemoryChannelKeysDecodeErrorZ_ok(long o);
-       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_InMemoryChannelKeysDecodeErrorZ_err(long e);
-       // void CResult_InMemoryChannelKeysDecodeErrorZ_free(struct LDKCResult_InMemoryChannelKeysDecodeErrorZ _res);
-       public static native void CResult_InMemoryChannelKeysDecodeErrorZ_free(long _res);
+       // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
+       public static native void CVec_SpendableOutputDescriptorZ_free(long[] _res);
        // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
        public static native long CResult_TxOutAccessErrorZ_ok(long o);
        // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
@@ -837,6 +1173,12 @@ public class bindings {
        public static native long CResult_NoneAPIErrorZ_err(long e);
        // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
        public static native void CResult_NoneAPIErrorZ_free(long _res);
+       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NoneAPIErrorZ_clone(long orig);
+       // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
+       public static native void CVec_CResult_NoneAPIErrorZZ_free(long[] _res);
+       // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
+       public static native void CVec_APIErrorZ_free(long[] _res);
        // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
        public static native void CVec_ChannelDetailsZ_free(long[] _res);
        // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
@@ -847,20 +1189,104 @@ public class bindings {
        public static native void CResult_NonePaymentSendFailureZ_free(long _res);
        // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
        public static native long CResult_NonePaymentSendFailureZ_clone(long orig);
-       // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
-       public static native void CVec_NetAddressZ_free(long[] _res);
        // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
        public static native void CVec_ChannelMonitorZ_free(long[] _res);
-       // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
-       public static native void C2Tuple_BlockHashChannelManagerZ_free(long _res);
        // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
        public static native long C2Tuple_BlockHashChannelManagerZ_new(byte[] a, long b);
+       // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
+       public static native void C2Tuple_BlockHashChannelManagerZ_free(long _res);
        // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
        public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(long o);
        // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(long e);
        // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
        public static native void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(long _res);
+       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
+       public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_ok(long o);
+       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_err(long e);
+       // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
+       public static native void CResult_SpendableOutputDescriptorDecodeErrorZ_free(long _res);
+       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_SpendableOutputDescriptorDecodeErrorZ_clone(long orig);
+       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
+       public static native long C2Tuple_SignatureCVec_SignatureZZ_clone(long orig);
+       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
+       public static native long C2Tuple_SignatureCVec_SignatureZZ_new(byte[] a, byte[][] b);
+       // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
+       public static native void C2Tuple_SignatureCVec_SignatureZZ_free(long _res);
+       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
+       public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(long o);
+       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
+       public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
+       // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
+       public static native void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(long _res);
+       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
+       public static native long CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(long orig);
+       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
+       public static native long CResult_SignatureNoneZ_ok(byte[] o);
+       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
+       public static native long CResult_SignatureNoneZ_err();
+       // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
+       public static native void CResult_SignatureNoneZ_free(long _res);
+       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
+       public static native long CResult_SignatureNoneZ_clone(long orig);
+       // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
+       public static native long CResult_SignDecodeErrorZ_ok(long o);
+       // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_SignDecodeErrorZ_err(long e);
+       // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
+       public static native void CResult_SignDecodeErrorZ_free(long _res);
+       // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_SignDecodeErrorZ_clone(long orig);
+       // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
+       public static native void CVec_CVec_u8ZZ_free(byte[][] _res);
+       // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
+       public static native long CResult_CVec_CVec_u8ZZNoneZ_ok(byte[][] o);
+       // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
+       public static native long CResult_CVec_CVec_u8ZZNoneZ_err();
+       // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
+       public static native void CResult_CVec_CVec_u8ZZNoneZ_free(long _res);
+       // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
+       public static native long CResult_CVec_CVec_u8ZZNoneZ_clone(long orig);
+       // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
+       public static native long CResult_InMemorySignerDecodeErrorZ_ok(long o);
+       // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_InMemorySignerDecodeErrorZ_err(long e);
+       // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
+       public static native void CResult_InMemorySignerDecodeErrorZ_free(long _res);
+       // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_InMemorySignerDecodeErrorZ_clone(long orig);
+       // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
+       public static native void CVec_TxOutZ_free(long[] _res);
+       // 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();
+       // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
+       public static native void CResult_TransactionNoneZ_free(long _res);
+       // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
+       public static native void CVec_RouteHopZ_free(long[] _res);
+       // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
+       public static native void CVec_CVec_RouteHopZZ_free(long[][] _res);
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
+       public static native long CResult_RouteDecodeErrorZ_ok(long o);
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_RouteDecodeErrorZ_err(long e);
+       // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
+       public static native void CResult_RouteDecodeErrorZ_free(long _res);
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RouteDecodeErrorZ_clone(long orig);
+       // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
+       public static native void CVec_RouteHintZ_free(long[] _res);
+       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
+       public static native long CResult_RouteLightningErrorZ_ok(long o);
+       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
+       public static native long CResult_RouteLightningErrorZ_err(long e);
+       // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
+       public static native void CResult_RouteLightningErrorZ_free(long _res);
+       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RouteLightningErrorZ_clone(long orig);
        // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
        public static native long CResult_NetAddressu8Z_ok(long o);
        // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
@@ -875,8 +1301,8 @@ public class bindings {
        public static native long CResult_CResult_NetAddressu8ZDecodeErrorZ_err(long e);
        // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
        public static native void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(long _res);
-       // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
-       public static native void CVec_u64Z_free(long[] _res);
+       // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(long orig);
        // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
        public static native void CVec_UpdateAddHTLCZ_free(long[] _res);
        // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
@@ -885,214 +1311,254 @@ public class bindings {
        public static native void CVec_UpdateFailHTLCZ_free(long[] _res);
        // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
        public static native void CVec_UpdateFailMalformedHTLCZ_free(long[] _res);
-       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
-       public static native long CResult_boolLightningErrorZ_ok(boolean o);
-       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
-       public static native long CResult_boolLightningErrorZ_err(long e);
-       // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
-       public static native void CResult_boolLightningErrorZ_free(long _res);
-       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
-       public static native long CResult_boolLightningErrorZ_clone(long orig);
-       // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
-       public static native void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(long _res);
-       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
-       public static native long C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(long a, long b, long c);
-       // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
-       public static native void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(long[] _res);
-       // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
-       public static native void CVec_NodeAnnouncementZ_free(long[] _res);
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
-       public static native long CResult_NoneLightningErrorZ_ok();
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
-       public static native long CResult_NoneLightningErrorZ_err(long e);
-       // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
-       public static native void CResult_NoneLightningErrorZ_free(long _res);
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
-       public static native long CResult_NoneLightningErrorZ_clone(long orig);
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
+       public static native long CResult_AcceptChannelDecodeErrorZ_ok(long o);
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_AcceptChannelDecodeErrorZ_err(long e);
+       // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
+       public static native void CResult_AcceptChannelDecodeErrorZ_free(long _res);
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_AcceptChannelDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
+       public static native long CResult_AnnouncementSignaturesDecodeErrorZ_ok(long o);
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_AnnouncementSignaturesDecodeErrorZ_err(long e);
+       // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
+       public static native void CResult_AnnouncementSignaturesDecodeErrorZ_free(long _res);
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_AnnouncementSignaturesDecodeErrorZ_clone(long orig);
        // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
        public static native long CResult_ChannelReestablishDecodeErrorZ_ok(long o);
        // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_ChannelReestablishDecodeErrorZ_err(long e);
        // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
        public static native void CResult_ChannelReestablishDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelReestablishDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
+       public static native long CResult_ClosingSignedDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ClosingSignedDecodeErrorZ_err(long e);
+       // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
+       public static native void CResult_ClosingSignedDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ClosingSignedDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
+       public static native long CResult_CommitmentSignedDecodeErrorZ_ok(long o);
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_CommitmentSignedDecodeErrorZ_err(long e);
+       // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
+       public static native void CResult_CommitmentSignedDecodeErrorZ_free(long _res);
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_CommitmentSignedDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
+       public static native long CResult_FundingCreatedDecodeErrorZ_ok(long o);
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_FundingCreatedDecodeErrorZ_err(long e);
+       // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
+       public static native void CResult_FundingCreatedDecodeErrorZ_free(long _res);
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_FundingCreatedDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
+       public static native long CResult_FundingSignedDecodeErrorZ_ok(long o);
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_FundingSignedDecodeErrorZ_err(long e);
+       // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
+       public static native void CResult_FundingSignedDecodeErrorZ_free(long _res);
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_FundingSignedDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
+       public static native long CResult_FundingLockedDecodeErrorZ_ok(long o);
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_FundingLockedDecodeErrorZ_err(long e);
+       // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
+       public static native void CResult_FundingLockedDecodeErrorZ_free(long _res);
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_FundingLockedDecodeErrorZ_clone(long orig);
        // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
        public static native long CResult_InitDecodeErrorZ_ok(long o);
        // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_InitDecodeErrorZ_err(long e);
        // void CResult_InitDecodeErrorZ_free(struct LDKCResult_InitDecodeErrorZ _res);
        public static native void CResult_InitDecodeErrorZ_free(long _res);
+       // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_InitDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
+       public static native long CResult_OpenChannelDecodeErrorZ_ok(long o);
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_OpenChannelDecodeErrorZ_err(long e);
+       // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
+       public static native void CResult_OpenChannelDecodeErrorZ_free(long _res);
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_OpenChannelDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
+       public static native long CResult_RevokeAndACKDecodeErrorZ_ok(long o);
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_RevokeAndACKDecodeErrorZ_err(long e);
+       // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
+       public static native void CResult_RevokeAndACKDecodeErrorZ_free(long _res);
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_RevokeAndACKDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
+       public static native long CResult_ShutdownDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ShutdownDecodeErrorZ_err(long e);
+       // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
+       public static native void CResult_ShutdownDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ShutdownDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
+       public static native long CResult_UpdateFailHTLCDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UpdateFailHTLCDecodeErrorZ_err(long e);
+       // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
+       public static native void CResult_UpdateFailHTLCDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UpdateFailHTLCDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
+       public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(long e);
+       // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
+       public static native void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
+       public static native long CResult_UpdateFeeDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UpdateFeeDecodeErrorZ_err(long e);
+       // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
+       public static native void CResult_UpdateFeeDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UpdateFeeDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
+       public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_err(long e);
+       // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
+       public static native void CResult_UpdateFulfillHTLCDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UpdateFulfillHTLCDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
+       public static native long CResult_UpdateAddHTLCDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UpdateAddHTLCDecodeErrorZ_err(long e);
+       // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
+       public static native void CResult_UpdateAddHTLCDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UpdateAddHTLCDecodeErrorZ_clone(long orig);
        // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
        public static native long CResult_PingDecodeErrorZ_ok(long o);
        // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_PingDecodeErrorZ_err(long e);
        // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
        public static native void CResult_PingDecodeErrorZ_free(long _res);
+       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_PingDecodeErrorZ_clone(long orig);
        // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
        public static native long CResult_PongDecodeErrorZ_ok(long o);
        // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_PongDecodeErrorZ_err(long e);
        // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
        public static native void CResult_PongDecodeErrorZ_free(long _res);
+       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_PongDecodeErrorZ_clone(long orig);
        // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
        public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(long o);
        // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(long e);
        // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
        public static native void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
+       public static native long CResult_ChannelAnnouncementDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelAnnouncementDecodeErrorZ_err(long e);
+       // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
+       public static native void CResult_ChannelAnnouncementDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelAnnouncementDecodeErrorZ_clone(long orig);
        // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
        public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_ok(long o);
        // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_err(long e);
        // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
        public static native void CResult_UnsignedChannelUpdateDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UnsignedChannelUpdateDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
+       public static native long CResult_ChannelUpdateDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ChannelUpdateDecodeErrorZ_err(long e);
+       // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
+       public static native void CResult_ChannelUpdateDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ChannelUpdateDecodeErrorZ_clone(long orig);
        // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
        public static native long CResult_ErrorMessageDecodeErrorZ_ok(long o);
        // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
        public static native long CResult_ErrorMessageDecodeErrorZ_err(long e);
        // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
        public static native void CResult_ErrorMessageDecodeErrorZ_free(long _res);
-       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
-       public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(long o);
-       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(long e);
-       // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
-       public static native void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(long _res);
-       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
-       public static native long CResult_QueryShortChannelIdsDecodeErrorZ_ok(long o);
-       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_QueryShortChannelIdsDecodeErrorZ_err(long e);
-       // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
-       public static native void CResult_QueryShortChannelIdsDecodeErrorZ_free(long _res);
-       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
-       public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(long o);
-       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(long e);
-       // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
-       public static native void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(long _res);
-       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
-       public static native long CResult_QueryChannelRangeDecodeErrorZ_ok(long o);
-       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_QueryChannelRangeDecodeErrorZ_err(long e);
-       // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
-       public static native void CResult_QueryChannelRangeDecodeErrorZ_free(long _res);
-       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
-       public static native long CResult_ReplyChannelRangeDecodeErrorZ_ok(long o);
-       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_ReplyChannelRangeDecodeErrorZ_err(long e);
-       // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
-       public static native void CResult_ReplyChannelRangeDecodeErrorZ_free(long _res);
-       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
-       public static native long CResult_GossipTimestampFilterDecodeErrorZ_ok(long o);
-       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_GossipTimestampFilterDecodeErrorZ_err(long e);
-       // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
-       public static native void CResult_GossipTimestampFilterDecodeErrorZ_free(long _res);
-       // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
-       public static native void CVec_PublicKeyZ_free(byte[][] _res);
-       // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
-       public static native void CVec_u8Z_free(byte[] _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);
-       public static native long CResult_CVec_u8ZPeerHandleErrorZ_err(long e);
-       // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
-       public static native void CResult_CVec_u8ZPeerHandleErrorZ_free(long _res);
-       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
-       public static native long CResult_CVec_u8ZPeerHandleErrorZ_clone(long orig);
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
-       public static native long CResult_NonePeerHandleErrorZ_ok();
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       public static native long CResult_NonePeerHandleErrorZ_err(long e);
-       // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
-       public static native void CResult_NonePeerHandleErrorZ_free(long _res);
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
-       public static native long CResult_NonePeerHandleErrorZ_clone(long orig);
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
-       public static native long CResult_boolPeerHandleErrorZ_ok(boolean o);
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       public static native long CResult_boolPeerHandleErrorZ_err(long e);
-       // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
-       public static native void CResult_boolPeerHandleErrorZ_free(long _res);
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
-       public static native long CResult_boolPeerHandleErrorZ_clone(long orig);
-       // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_ok(struct LDKSecretKey o);
-       public static native long CResult_SecretKeySecpErrorZ_ok(byte[] o);
-       // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_err(enum LDKSecp256k1Error e);
-       public static native long CResult_SecretKeySecpErrorZ_err(LDKSecp256k1Error e);
-       // void CResult_SecretKeySecpErrorZ_free(struct LDKCResult_SecretKeySecpErrorZ _res);
-       public static native void CResult_SecretKeySecpErrorZ_free(long _res);
-       // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_ok(struct LDKPublicKey o);
-       public static native long CResult_PublicKeySecpErrorZ_ok(byte[] o);
-       // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_err(enum LDKSecp256k1Error e);
-       public static native long CResult_PublicKeySecpErrorZ_err(LDKSecp256k1Error e);
-       // void CResult_PublicKeySecpErrorZ_free(struct LDKCResult_PublicKeySecpErrorZ _res);
-       public static native void CResult_PublicKeySecpErrorZ_free(long _res);
-       // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_ok(struct LDKTxCreationKeys o);
-       public static native long CResult_TxCreationKeysSecpErrorZ_ok(long o);
-       // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_err(enum LDKSecp256k1Error e);
-       public static native long CResult_TxCreationKeysSecpErrorZ_err(LDKSecp256k1Error e);
-       // void CResult_TxCreationKeysSecpErrorZ_free(struct LDKCResult_TxCreationKeysSecpErrorZ _res);
-       public static native void CResult_TxCreationKeysSecpErrorZ_free(long _res);
-       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
-       public static native long CResult_TrustedCommitmentTransactionNoneZ_ok(long o);
-       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
-       public static native long CResult_TrustedCommitmentTransactionNoneZ_err();
-       // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
-       public static native void CResult_TrustedCommitmentTransactionNoneZ_free(long _res);
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
-       public static native long CResult_CVec_SignatureZNoneZ_ok(byte[][] o);
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
-       public static native long CResult_CVec_SignatureZNoneZ_err();
-       // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
-       public static native void CResult_CVec_SignatureZNoneZ_free(long _res);
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
-       public static native long CResult_CVec_SignatureZNoneZ_clone(long orig);
-       // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
-       public static native void CVec_RouteHopZ_free(long[] _res);
-       // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
-       public static native void CVec_CVec_RouteHopZZ_free(long[][] _res);
-       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
-       public static native long CResult_RouteDecodeErrorZ_ok(long o);
-       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_RouteDecodeErrorZ_err(long e);
-       // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
-       public static native void CResult_RouteDecodeErrorZ_free(long _res);
-       // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
-       public static native void CVec_RouteHintZ_free(long[] _res);
-       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
-       public static native long CResult_RouteLightningErrorZ_ok(long o);
-       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
-       public static native long CResult_RouteLightningErrorZ_err(long e);
-       // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
-       public static native void CResult_RouteLightningErrorZ_free(long _res);
-       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
-       public static native long CResult_RoutingFeesDecodeErrorZ_ok(long o);
-       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_RoutingFeesDecodeErrorZ_err(long e);
-       // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
-       public static native void CResult_RoutingFeesDecodeErrorZ_free(long _res);
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
-       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_ok(long o);
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_err(long e);
-       // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
-       public static native void CResult_NodeAnnouncementInfoDecodeErrorZ_free(long _res);
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
-       public static native long CResult_NodeAnnouncementInfoDecodeErrorZ_clone(long orig);
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
-       public static native long CResult_NodeInfoDecodeErrorZ_ok(long o);
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_NodeInfoDecodeErrorZ_err(long e);
-       // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
-       public static native void CResult_NodeInfoDecodeErrorZ_free(long _res);
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
-       public static native long CResult_NodeInfoDecodeErrorZ_clone(long orig);
-       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
-       public static native long CResult_NetworkGraphDecodeErrorZ_ok(long o);
-       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
-       public static native long CResult_NetworkGraphDecodeErrorZ_err(long e);
-       // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
-       public static native void CResult_NetworkGraphDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ErrorMessageDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
+       public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(long o);
+       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(long e);
+       // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
+       public static native void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(long _res);
+       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
+       public static native long CResult_NodeAnnouncementDecodeErrorZ_ok(long o);
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_NodeAnnouncementDecodeErrorZ_err(long e);
+       // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
+       public static native void CResult_NodeAnnouncementDecodeErrorZ_free(long _res);
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_NodeAnnouncementDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
+       public static native long CResult_QueryShortChannelIdsDecodeErrorZ_ok(long o);
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_QueryShortChannelIdsDecodeErrorZ_err(long e);
+       // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
+       public static native void CResult_QueryShortChannelIdsDecodeErrorZ_free(long _res);
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_QueryShortChannelIdsDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
+       public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(long e);
+       // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
+       public static native void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
+       public static native long CResult_QueryChannelRangeDecodeErrorZ_ok(long o);
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_QueryChannelRangeDecodeErrorZ_err(long e);
+       // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
+       public static native void CResult_QueryChannelRangeDecodeErrorZ_free(long _res);
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_QueryChannelRangeDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
+       public static native long CResult_ReplyChannelRangeDecodeErrorZ_ok(long o);
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_ReplyChannelRangeDecodeErrorZ_err(long e);
+       // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
+       public static native void CResult_ReplyChannelRangeDecodeErrorZ_free(long _res);
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_ReplyChannelRangeDecodeErrorZ_clone(long orig);
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
+       public static native long CResult_GossipTimestampFilterDecodeErrorZ_ok(long o);
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
+       public static native long CResult_GossipTimestampFilterDecodeErrorZ_err(long e);
+       // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
+       public static native void CResult_GossipTimestampFilterDecodeErrorZ_free(long _res);
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
+       public static native long CResult_GossipTimestampFilterDecodeErrorZ_clone(long orig);
        // void Event_free(struct LDKEvent this_ptr);
        public static native void Event_free(long this_ptr);
        // struct LDKEvent Event_clone(const struct LDKEvent *NONNULL_PTR orig);
@@ -1119,8 +1585,6 @@ public class bindings {
        public static native void Logger_free(long this_ptr);
        // void ChannelHandshakeConfig_free(struct LDKChannelHandshakeConfig this_ptr);
        public static native void ChannelHandshakeConfig_free(long this_ptr);
-       // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
-       public static native long ChannelHandshakeConfig_clone(long orig);
        // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
        public static native int ChannelHandshakeConfig_get_minimum_depth(long this_ptr);
        // void ChannelHandshakeConfig_set_minimum_depth(struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr, uint32_t val);
@@ -1135,12 +1599,12 @@ public class bindings {
        public static native void ChannelHandshakeConfig_set_our_htlc_minimum_msat(long this_ptr, long val);
        // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_new(uint32_t minimum_depth_arg, uint16_t our_to_self_delay_arg, uint64_t our_htlc_minimum_msat_arg);
        public static native long ChannelHandshakeConfig_new(int minimum_depth_arg, short our_to_self_delay_arg, long our_htlc_minimum_msat_arg);
+       // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
+       public static native long ChannelHandshakeConfig_clone(long orig);
        // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
        public static native long ChannelHandshakeConfig_default();
        // void ChannelHandshakeLimits_free(struct LDKChannelHandshakeLimits this_ptr);
        public static native void ChannelHandshakeLimits_free(long this_ptr);
-       // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
-       public static native long ChannelHandshakeLimits_clone(long orig);
        // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
        public static native long ChannelHandshakeLimits_get_min_funding_satoshis(long this_ptr);
        // void ChannelHandshakeLimits_set_min_funding_satoshis(struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr, uint64_t val);
@@ -1183,12 +1647,12 @@ public class bindings {
        public static native void ChannelHandshakeLimits_set_their_to_self_delay(long this_ptr, short val);
        // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_new(uint64_t min_funding_satoshis_arg, uint64_t max_htlc_minimum_msat_arg, uint64_t min_max_htlc_value_in_flight_msat_arg, uint64_t max_channel_reserve_satoshis_arg, uint16_t min_max_accepted_htlcs_arg, uint64_t min_dust_limit_satoshis_arg, uint64_t max_dust_limit_satoshis_arg, uint32_t max_minimum_depth_arg, bool force_announced_channel_preference_arg, uint16_t their_to_self_delay_arg);
        public static native long ChannelHandshakeLimits_new(long min_funding_satoshis_arg, long max_htlc_minimum_msat_arg, long min_max_htlc_value_in_flight_msat_arg, long max_channel_reserve_satoshis_arg, short min_max_accepted_htlcs_arg, long min_dust_limit_satoshis_arg, long max_dust_limit_satoshis_arg, int max_minimum_depth_arg, boolean force_announced_channel_preference_arg, short their_to_self_delay_arg);
+       // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
+       public static native long ChannelHandshakeLimits_clone(long orig);
        // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
        public static native long ChannelHandshakeLimits_default();
        // void ChannelConfig_free(struct LDKChannelConfig this_ptr);
        public static native void ChannelConfig_free(long this_ptr);
-       // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
-       public static native long ChannelConfig_clone(long orig);
        // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
        public static native int ChannelConfig_get_fee_proportional_millionths(long this_ptr);
        // void ChannelConfig_set_fee_proportional_millionths(struct LDKChannelConfig *NONNULL_PTR this_ptr, uint32_t val);
@@ -1203,16 +1667,16 @@ public class bindings {
        public static native void ChannelConfig_set_commit_upfront_shutdown_pubkey(long this_ptr, boolean val);
        // MUST_USE_RES struct LDKChannelConfig ChannelConfig_new(uint32_t fee_proportional_millionths_arg, bool announced_channel_arg, bool commit_upfront_shutdown_pubkey_arg);
        public static native long ChannelConfig_new(int fee_proportional_millionths_arg, boolean announced_channel_arg, boolean commit_upfront_shutdown_pubkey_arg);
+       // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
+       public static native long ChannelConfig_clone(long orig);
        // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
        public static native long ChannelConfig_default();
        // struct LDKCVec_u8Z ChannelConfig_write(const struct LDKChannelConfig *NONNULL_PTR obj);
        public static native byte[] ChannelConfig_write(long obj);
-       // struct LDKChannelConfig ChannelConfig_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
        public static native long ChannelConfig_read(byte[] ser);
        // void UserConfig_free(struct LDKUserConfig this_ptr);
        public static native void UserConfig_free(long this_ptr);
-       // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
-       public static native long UserConfig_clone(long orig);
        // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
        public static native long UserConfig_get_own_channel_config(long this_ptr);
        // void UserConfig_set_own_channel_config(struct LDKUserConfig *NONNULL_PTR this_ptr, struct LDKChannelHandshakeConfig val);
@@ -1227,12 +1691,16 @@ public class bindings {
        public static native void UserConfig_set_channel_options(long this_ptr, long val);
        // MUST_USE_RES struct LDKUserConfig UserConfig_new(struct LDKChannelHandshakeConfig own_channel_config_arg, struct LDKChannelHandshakeLimits peer_channel_config_limits_arg, struct LDKChannelConfig channel_options_arg);
        public static native long UserConfig_new(long own_channel_config_arg, long peer_channel_config_limits_arg, long channel_options_arg);
+       // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
+       public static native long UserConfig_clone(long orig);
        // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
        public static native long UserConfig_default();
        // enum LDKAccessError AccessError_clone(const enum LDKAccessError *NONNULL_PTR orig);
        public static native LDKAccessError AccessError_clone(long orig);
        // void Access_free(struct LDKAccess this_ptr);
        public static native void Access_free(long this_ptr);
+       // void Listen_free(struct LDKListen this_ptr);
+       public static native void Listen_free(long this_ptr);
        // void Watch_free(struct LDKWatch this_ptr);
        public static native void Watch_free(long this_ptr);
        // void Filter_free(struct LDKFilter this_ptr);
@@ -1257,12 +1725,12 @@ public class bindings {
        public static native long ChainMonitor_as_EventsProvider(long this_arg);
        // void ChannelMonitorUpdate_free(struct LDKChannelMonitorUpdate this_ptr);
        public static native void ChannelMonitorUpdate_free(long this_ptr);
-       // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
-       public static native long ChannelMonitorUpdate_clone(long orig);
        // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
        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 LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
+       public static native long ChannelMonitorUpdate_clone(long orig);
        // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
        public static native byte[] ChannelMonitorUpdate_write(long obj);
        // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ ChannelMonitorUpdate_read(struct LDKu8slice ser);
@@ -1283,7 +1751,7 @@ public class bindings {
        public static native long HTLCUpdate_clone(long orig);
        // struct LDKCVec_u8Z HTLCUpdate_write(const struct LDKHTLCUpdate *NONNULL_PTR obj);
        public static native byte[] HTLCUpdate_write(long obj);
-       // struct LDKHTLCUpdate HTLCUpdate_read(struct LDKu8slice ser);
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
        public static native long HTLCUpdate_read(byte[] ser);
        // void ChannelMonitor_free(struct LDKChannelMonitor this_ptr);
        public static native void ChannelMonitor_free(long this_ptr);
@@ -1291,21 +1759,21 @@ public class bindings {
        public static native long ChannelMonitor_clone(long orig);
        // struct LDKCVec_u8Z ChannelMonitor_write(const struct LDKChannelMonitor *NONNULL_PTR obj);
        public static native byte[] ChannelMonitor_write(long obj);
-       // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
+       // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
        public static native long ChannelMonitor_update_monitor(long this_arg, long updates, long broadcaster, long fee_estimator, long logger);
        // MUST_USE_RES uint64_t ChannelMonitor_get_latest_update_id(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
        public static native long ChannelMonitor_get_latest_update_id(long this_arg);
        // MUST_USE_RES struct LDKC2Tuple_OutPointScriptZ 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 LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(struct LDKChannelMonitor *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
        public static native long[] ChannelMonitor_get_and_clear_pending_monitor_events(long this_arg);
-       // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(struct LDKChannelMonitor *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
        public static native long[] ChannelMonitor_get_and_clear_pending_events(long this_arg);
-       // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
+       // 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);
-       // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(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, struct LDKLogger logger);
+       // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_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, struct LDKLogger 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(struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger 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, struct LDKLogger logger);
        public static native void ChannelMonitor_block_disconnected(long this_arg, byte[] header, int height, long broadcaster, long fee_estimator, long logger);
        // void Persist_free(struct LDKPersist this_ptr);
        public static native void Persist_free(long this_ptr);
@@ -1313,8 +1781,6 @@ public class bindings {
        public static native long C2Tuple_BlockHashChannelMonitorZ_read(byte[] ser, long arg);
        // void OutPoint_free(struct LDKOutPoint this_ptr);
        public static native void OutPoint_free(long this_ptr);
-       // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
-       public static native long OutPoint_clone(long orig);
        // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
        public static native byte[] OutPoint_get_txid(long this_ptr);
        // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1325,12 +1791,66 @@ public class bindings {
        public static native void OutPoint_set_index(long this_ptr, short val);
        // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
        public static native long OutPoint_new(byte[] txid_arg, short index_arg);
+       // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
+       public static native long OutPoint_clone(long orig);
        // 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 LDKOutPoint OutPoint_read(struct LDKu8slice ser);
+       // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
        public static native long OutPoint_read(byte[] ser);
+       // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_ptr);
+       public static native void DelayedPaymentOutputDescriptor_free(long this_ptr);
+       // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       public static native long DelayedPaymentOutputDescriptor_get_outpoint(long this_ptr);
+       // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+       public static native void DelayedPaymentOutputDescriptor_set_outpoint(long this_ptr, long val);
+       // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       public static native byte[] DelayedPaymentOutputDescriptor_get_per_commitment_point(long this_ptr);
+       // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void DelayedPaymentOutputDescriptor_set_per_commitment_point(long this_ptr, byte[] val);
+       // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       public static native short DelayedPaymentOutputDescriptor_get_to_self_delay(long this_ptr);
+       // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
+       public static native void DelayedPaymentOutputDescriptor_set_to_self_delay(long this_ptr, short val);
+       // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
+       public static native void DelayedPaymentOutputDescriptor_set_output(long this_ptr, long val);
+       // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       public static native byte[] DelayedPaymentOutputDescriptor_get_revocation_pubkey(long this_ptr);
+       // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       public static native void DelayedPaymentOutputDescriptor_set_revocation_pubkey(long this_ptr, byte[] val);
+       // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
+       public static native byte[] DelayedPaymentOutputDescriptor_get_channel_keys_id(long this_ptr);
+       // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void DelayedPaymentOutputDescriptor_set_channel_keys_id(long this_ptr, byte[] val);
+       // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       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 LDKPublicKey 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, byte[] revocation_pubkey_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg);
+       // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
+       public static native long DelayedPaymentOutputDescriptor_clone(long orig);
+       // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_ptr);
+       public static native void StaticPaymentOutputDescriptor_free(long this_ptr);
+       // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       public static native long StaticPaymentOutputDescriptor_get_outpoint(long this_ptr);
+       // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+       public static native void StaticPaymentOutputDescriptor_set_outpoint(long this_ptr, long val);
+       // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
+       public static native void StaticPaymentOutputDescriptor_set_output(long this_ptr, long val);
+       // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
+       public static native byte[] StaticPaymentOutputDescriptor_get_channel_keys_id(long this_ptr);
+       // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void StaticPaymentOutputDescriptor_set_channel_keys_id(long this_ptr, byte[] val);
+       // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       public static native long StaticPaymentOutputDescriptor_get_channel_value_satoshis(long this_ptr);
+       // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
+       public static native void StaticPaymentOutputDescriptor_set_channel_value_satoshis(long this_ptr, long val);
+       // MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut output_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
+       public static native long StaticPaymentOutputDescriptor_new(long outpoint_arg, long output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg);
+       // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
+       public static native long StaticPaymentOutputDescriptor_clone(long orig);
        // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
        public static native void SpendableOutputDescriptor_free(long this_ptr);
        // struct LDKSpendableOutputDescriptor SpendableOutputDescriptor_clone(const struct LDKSpendableOutputDescriptor *NONNULL_PTR orig);
@@ -1339,74 +1859,94 @@ public class bindings {
        public static native byte[] SpendableOutputDescriptor_write(long obj);
        // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ SpendableOutputDescriptor_read(struct LDKu8slice ser);
        public static native long SpendableOutputDescriptor_read(byte[] ser);
-       // struct LDKChannelKeys ChannelKeys_clone(const struct LDKChannelKeys *NONNULL_PTR orig);
-       public static native long ChannelKeys_clone(long orig);
-       // void ChannelKeys_free(struct LDKChannelKeys this_ptr);
-       public static native void ChannelKeys_free(long this_ptr);
+       // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
+       public static native long Sign_clone(long orig);
+       // void Sign_free(struct LDKSign this_ptr);
+       public static native void Sign_free(long this_ptr);
        // void KeysInterface_free(struct LDKKeysInterface this_ptr);
        public static native void KeysInterface_free(long this_ptr);
-       // void InMemoryChannelKeys_free(struct LDKInMemoryChannelKeys this_ptr);
-       public static native void InMemoryChannelKeys_free(long this_ptr);
-       // struct LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const struct LDKInMemoryChannelKeys *NONNULL_PTR orig);
-       public static native long InMemoryChannelKeys_clone(long orig);
-       // const uint8_t (*InMemoryChannelKeys_get_funding_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       public static native byte[] InMemoryChannelKeys_get_funding_key(long this_ptr);
-       // void InMemoryChannelKeys_set_funding_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
-       public static native void InMemoryChannelKeys_set_funding_key(long this_ptr, byte[] val);
-       // const uint8_t (*InMemoryChannelKeys_get_revocation_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       public static native byte[] InMemoryChannelKeys_get_revocation_base_key(long this_ptr);
-       // void InMemoryChannelKeys_set_revocation_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
-       public static native void InMemoryChannelKeys_set_revocation_base_key(long this_ptr, byte[] val);
-       // const uint8_t (*InMemoryChannelKeys_get_payment_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       public static native byte[] InMemoryChannelKeys_get_payment_key(long this_ptr);
-       // void InMemoryChannelKeys_set_payment_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
-       public static native void InMemoryChannelKeys_set_payment_key(long this_ptr, byte[] val);
-       // const uint8_t (*InMemoryChannelKeys_get_delayed_payment_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       public static native byte[] InMemoryChannelKeys_get_delayed_payment_base_key(long this_ptr);
-       // void InMemoryChannelKeys_set_delayed_payment_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
-       public static native void InMemoryChannelKeys_set_delayed_payment_base_key(long this_ptr, byte[] val);
-       // const uint8_t (*InMemoryChannelKeys_get_htlc_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       public static native byte[] InMemoryChannelKeys_get_htlc_base_key(long this_ptr);
-       // void InMemoryChannelKeys_set_htlc_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
-       public static native void InMemoryChannelKeys_set_htlc_base_key(long this_ptr, byte[] val);
-       // const uint8_t (*InMemoryChannelKeys_get_commitment_seed(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       public static native byte[] InMemoryChannelKeys_get_commitment_seed(long this_ptr);
-       // void InMemoryChannelKeys_set_commitment_seed(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       public static native void InMemoryChannelKeys_set_commitment_seed(long this_ptr, byte[] val);
-       // MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKC2Tuple_u64u64Z key_derivation_params);
-       public static native long InMemoryChannelKeys_new(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, long key_derivation_params);
-       // MUST_USE_RES struct LDKChannelPublicKeys InMemoryChannelKeys_counterparty_pubkeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       public static native long InMemoryChannelKeys_counterparty_pubkeys(long this_arg);
-       // MUST_USE_RES uint16_t InMemoryChannelKeys_counterparty_selected_contest_delay(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       public static native short InMemoryChannelKeys_counterparty_selected_contest_delay(long this_arg);
-       // MUST_USE_RES uint16_t InMemoryChannelKeys_holder_selected_contest_delay(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       public static native short InMemoryChannelKeys_holder_selected_contest_delay(long this_arg);
-       // MUST_USE_RES bool InMemoryChannelKeys_is_outbound(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       public static native boolean InMemoryChannelKeys_is_outbound(long this_arg);
-       // MUST_USE_RES struct LDKOutPoint InMemoryChannelKeys_funding_outpoint(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       public static native long InMemoryChannelKeys_funding_outpoint(long this_arg);
-       // MUST_USE_RES struct LDKChannelTransactionParameters InMemoryChannelKeys_get_channel_parameters(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       public static native long InMemoryChannelKeys_get_channel_parameters(long this_arg);
-       // struct LDKChannelKeys InMemoryChannelKeys_as_ChannelKeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       public static native long InMemoryChannelKeys_as_ChannelKeys(long this_arg);
-       // struct LDKCVec_u8Z InMemoryChannelKeys_write(const struct LDKInMemoryChannelKeys *NONNULL_PTR obj);
-       public static native byte[] InMemoryChannelKeys_write(long obj);
-       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ InMemoryChannelKeys_read(struct LDKu8slice ser);
-       public static native long InMemoryChannelKeys_read(byte[] ser);
+       // void InMemorySigner_free(struct LDKInMemorySigner this_ptr);
+       public static native void InMemorySigner_free(long this_ptr);
+       // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       public static native byte[] InMemorySigner_get_funding_key(long this_ptr);
+       // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+       public static native void InMemorySigner_set_funding_key(long this_ptr, byte[] val);
+       // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       public static native byte[] InMemorySigner_get_revocation_base_key(long this_ptr);
+       // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+       public static native void InMemorySigner_set_revocation_base_key(long this_ptr, byte[] val);
+       // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       public static native byte[] InMemorySigner_get_payment_key(long this_ptr);
+       // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+       public static native void InMemorySigner_set_payment_key(long this_ptr, byte[] val);
+       // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       public static native byte[] InMemorySigner_get_delayed_payment_base_key(long this_ptr);
+       // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+       public static native void InMemorySigner_set_delayed_payment_base_key(long this_ptr, byte[] val);
+       // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       public static native byte[] InMemorySigner_get_htlc_base_key(long this_ptr);
+       // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+       public static native void InMemorySigner_set_htlc_base_key(long this_ptr, byte[] val);
+       // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       public static native byte[] InMemorySigner_get_commitment_seed(long this_ptr);
+       // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void InMemorySigner_set_commitment_seed(long this_ptr, byte[] val);
+       // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
+       public static native long InMemorySigner_clone(long orig);
+       // MUST_USE_RES struct LDKInMemorySigner InMemorySigner_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKThirtyTwoBytes channel_keys_id);
+       public static native long InMemorySigner_new(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, byte[] channel_keys_id);
+       // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       public static native long InMemorySigner_counterparty_pubkeys(long this_arg);
+       // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       public static native short InMemorySigner_counterparty_selected_contest_delay(long this_arg);
+       // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       public static native short InMemorySigner_holder_selected_contest_delay(long this_arg);
+       // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       public static native boolean InMemorySigner_is_outbound(long this_arg);
+       // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       public static native long InMemorySigner_funding_outpoint(long this_arg);
+       // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       public static native long InMemorySigner_get_channel_parameters(long this_arg);
+       // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_counterparty_payment_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR descriptor);
+       public static native long InMemorySigner_sign_counterparty_payment_input(long this_arg, byte[] spend_tx, long input_idx, long descriptor);
+       // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_dynamic_p2wsh_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR descriptor);
+       public static native long InMemorySigner_sign_dynamic_p2wsh_input(long this_arg, byte[] spend_tx, long input_idx, long descriptor);
+       // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       public static native long InMemorySigner_as_Sign(long this_arg);
+       // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
+       public static native byte[] InMemorySigner_write(long obj);
+       // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
+       public static native long InMemorySigner_read(byte[] ser);
        // void KeysManager_free(struct LDKKeysManager this_ptr);
        public static native void KeysManager_free(long this_ptr);
-       // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], enum LDKNetwork network, uint64_t starting_time_secs, uint32_t starting_time_nanos);
-       public static native long KeysManager_new(byte[] seed, LDKNetwork network, long starting_time_secs, int starting_time_nanos);
-       // MUST_USE_RES struct LDKInMemoryChannelKeys KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, uint64_t params_1, uint64_t params_2);
-       public static native long KeysManager_derive_channel_keys(long this_arg, long channel_value_satoshis, long params_1, long params_2);
+       // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
+       public static native long KeysManager_new(byte[] seed, long starting_time_secs, int starting_time_nanos);
+       // MUST_USE_RES struct LDKInMemorySigner KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
+       public static native long KeysManager_derive_channel_keys(long this_arg, long channel_value_satoshis, byte[] params);
+       // 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);
+       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);
        // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
        public static native long KeysManager_as_KeysInterface(long this_arg);
        // void ChannelManager_free(struct LDKChannelManager this_ptr);
        public static native void ChannelManager_free(long this_ptr);
+       // void ChainParameters_free(struct LDKChainParameters this_ptr);
+       public static native void ChainParameters_free(long this_ptr);
+       // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
+       public static native LDKNetwork ChainParameters_get_network(long this_ptr);
+       // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
+       public static native void ChainParameters_set_network(long this_ptr, LDKNetwork val);
+       // const uint8_t (*ChainParameters_get_latest_hash(const struct LDKChainParameters *NONNULL_PTR this_ptr))[32];
+       public static native byte[] ChainParameters_get_latest_hash(long this_ptr);
+       // void ChainParameters_set_latest_hash(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       public static native void ChainParameters_set_latest_hash(long this_ptr, byte[] val);
+       // uintptr_t ChainParameters_get_latest_height(const struct LDKChainParameters *NONNULL_PTR this_ptr);
+       public static native long ChainParameters_get_latest_height(long this_ptr);
+       // void ChainParameters_set_latest_height(struct LDKChainParameters *NONNULL_PTR this_ptr, uintptr_t val);
+       public static native void ChainParameters_set_latest_height(long this_ptr, long val);
+       // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKThirtyTwoBytes latest_hash_arg, uintptr_t latest_height_arg);
+       public static native long ChainParameters_new(LDKNetwork network_arg, byte[] latest_hash_arg, long latest_height_arg);
        // void ChannelDetails_free(struct LDKChannelDetails this_ptr);
        public static native void ChannelDetails_free(long this_ptr);
-       // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
-       public static native long ChannelDetails_clone(long orig);
        // 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);
@@ -1439,12 +1979,14 @@ public class bindings {
        public static native boolean ChannelDetails_get_is_live(long this_ptr);
        // void ChannelDetails_set_is_live(struct LDKChannelDetails *NONNULL_PTR this_ptr, bool val);
        public static native void ChannelDetails_set_is_live(long this_ptr, boolean val);
+       // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
+       public static native long ChannelDetails_clone(long orig);
        // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
        public static native void PaymentSendFailure_free(long this_ptr);
        // struct LDKPaymentSendFailure PaymentSendFailure_clone(const struct LDKPaymentSendFailure *NONNULL_PTR orig);
        public static native long PaymentSendFailure_clone(long orig);
-       // MUST_USE_RES struct LDKChannelManager ChannelManager_new(enum LDKNetwork network, struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, uintptr_t current_blockchain_height);
-       public static native long ChannelManager_new(LDKNetwork network, long fee_est, long chain_monitor, long tx_broadcaster, long logger, long keys_manager, long config, long current_blockchain_height);
+       // MUST_USE_RES struct LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, struct LDKChainParameters params);
+       public static native long ChannelManager_new(long fee_est, long chain_monitor, long tx_broadcaster, long logger, long keys_manager, long config, long params);
        // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_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, long user_id, long override_config);
        // MUST_USE_RES struct LDKCVec_ChannelDetailsZ ChannelManager_list_channels(const struct LDKChannelManager *NONNULL_PTR this_arg);
@@ -1479,10 +2021,14 @@ public class bindings {
        public static native long ChannelManager_as_MessageSendEventsProvider(long this_arg);
        // struct LDKEventsProvider ChannelManager_as_EventsProvider(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native long ChannelManager_as_EventsProvider(long this_arg);
+       // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
+       public static native long ChannelManager_as_Listen(long this_arg);
        // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
        public static native void ChannelManager_block_connected(long this_arg, byte[] header, long[] txdata, int height);
        // void ChannelManager_block_disconnected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80]);
        public static native void ChannelManager_block_disconnected(long this_arg, byte[] header);
+       // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
+       public static native void ChannelManager_await_persistable_update(long this_arg);
        // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
        public static native long ChannelManager_as_ChannelMessageHandler(long this_arg);
        // struct LDKCVec_u8Z ChannelManager_write(const struct LDKChannelManager *NONNULL_PTR obj);
@@ -1523,12 +2069,16 @@ public class bindings {
        public static native long DecodeError_clone(long orig);
        // void Init_free(struct LDKInit this_ptr);
        public static native void Init_free(long this_ptr);
+       // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
+       public static native long Init_get_features(long this_ptr);
+       // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
+       public static native void Init_set_features(long this_ptr, long val);
+       // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
+       public static native long Init_new(long features_arg);
        // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
        public static native long Init_clone(long orig);
        // void ErrorMessage_free(struct LDKErrorMessage this_ptr);
        public static native void ErrorMessage_free(long this_ptr);
-       // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
-       public static native long ErrorMessage_clone(long orig);
        // 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);
@@ -1539,10 +2089,10 @@ public class bindings {
        public static native void ErrorMessage_set_data(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKErrorMessage ErrorMessage_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKCVec_u8Z data_arg);
        public static native long ErrorMessage_new(byte[] channel_id_arg, byte[] data_arg);
+       // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
+       public static native long ErrorMessage_clone(long orig);
        // void Ping_free(struct LDKPing this_ptr);
        public static native void Ping_free(long this_ptr);
-       // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
-       public static native long Ping_clone(long orig);
        // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
        public static native short Ping_get_ponglen(long this_ptr);
        // void Ping_set_ponglen(struct LDKPing *NONNULL_PTR this_ptr, uint16_t val);
@@ -1553,20 +2103,20 @@ public class bindings {
        public static native void Ping_set_byteslen(long this_ptr, short val);
        // MUST_USE_RES struct LDKPing Ping_new(uint16_t ponglen_arg, uint16_t byteslen_arg);
        public static native long Ping_new(short ponglen_arg, short byteslen_arg);
+       // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
+       public static native long Ping_clone(long orig);
        // void Pong_free(struct LDKPong this_ptr);
        public static native void Pong_free(long this_ptr);
-       // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
-       public static native long Pong_clone(long orig);
        // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
        public static native short Pong_get_byteslen(long this_ptr);
        // void Pong_set_byteslen(struct LDKPong *NONNULL_PTR this_ptr, uint16_t val);
        public static native void Pong_set_byteslen(long this_ptr, short val);
        // MUST_USE_RES struct LDKPong Pong_new(uint16_t byteslen_arg);
        public static native long Pong_new(short byteslen_arg);
+       // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
+       public static native long Pong_clone(long orig);
        // void OpenChannel_free(struct LDKOpenChannel this_ptr);
        public static native void OpenChannel_free(long this_ptr);
-       // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
-       public static native long OpenChannel_clone(long orig);
        // 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);
@@ -1639,10 +2189,10 @@ public class bindings {
        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 LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
+       public static native long OpenChannel_clone(long orig);
        // void AcceptChannel_free(struct LDKAcceptChannel this_ptr);
        public static native void AcceptChannel_free(long this_ptr);
-       // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
-       public static native long AcceptChannel_clone(long orig);
        // 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);
@@ -1699,10 +2249,10 @@ public class bindings {
        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 LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
+       public static native long AcceptChannel_clone(long orig);
        // void FundingCreated_free(struct LDKFundingCreated this_ptr);
        public static native void FundingCreated_free(long this_ptr);
-       // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
-       public static native long FundingCreated_clone(long orig);
        // 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);
@@ -1721,10 +2271,10 @@ public class bindings {
        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 LDKSignature 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);
+       // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
+       public static native long FundingCreated_clone(long orig);
        // void FundingSigned_free(struct LDKFundingSigned this_ptr);
        public static native void FundingSigned_free(long this_ptr);
-       // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
-       public static native long FundingSigned_clone(long orig);
        // 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);
@@ -1735,10 +2285,10 @@ public class bindings {
        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 LDKSignature signature_arg);
        public static native long FundingSigned_new(byte[] channel_id_arg, byte[] signature_arg);
+       // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
+       public static native long FundingSigned_clone(long orig);
        // void FundingLocked_free(struct LDKFundingLocked this_ptr);
        public static native void FundingLocked_free(long this_ptr);
-       // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
-       public static native long FundingLocked_clone(long orig);
        // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
        public static native byte[] FundingLocked_get_channel_id(long this_ptr);
        // void FundingLocked_set_channel_id(struct LDKFundingLocked *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1749,10 +2299,10 @@ public class bindings {
        public static native void FundingLocked_set_next_per_commitment_point(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKFundingLocked FundingLocked_new(struct LDKThirtyTwoBytes channel_id_arg, struct LDKPublicKey next_per_commitment_point_arg);
        public static native long FundingLocked_new(byte[] channel_id_arg, byte[] next_per_commitment_point_arg);
+       // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
+       public static native long FundingLocked_clone(long orig);
        // void Shutdown_free(struct LDKShutdown this_ptr);
        public static native void Shutdown_free(long this_ptr);
-       // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
-       public static native long Shutdown_clone(long orig);
        // 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);
@@ -1763,10 +2313,10 @@ public class bindings {
        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);
+       // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
+       public static native long Shutdown_clone(long orig);
        // void ClosingSigned_free(struct LDKClosingSigned this_ptr);
        public static native void ClosingSigned_free(long this_ptr);
-       // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
-       public static native long ClosingSigned_clone(long orig);
        // 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);
@@ -1781,10 +2331,10 @@ public class bindings {
        public static native void ClosingSigned_set_signature(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKClosingSigned ClosingSigned_new(struct LDKThirtyTwoBytes channel_id_arg, uint64_t fee_satoshis_arg, struct LDKSignature signature_arg);
        public static native long ClosingSigned_new(byte[] channel_id_arg, long fee_satoshis_arg, byte[] signature_arg);
+       // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
+       public static native long ClosingSigned_clone(long orig);
        // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_ptr);
        public static native void UpdateAddHTLC_free(long this_ptr);
-       // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
-       public static native long UpdateAddHTLC_clone(long orig);
        // 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);
@@ -1805,10 +2355,10 @@ public class bindings {
        public static native int UpdateAddHTLC_get_cltv_expiry(long this_ptr);
        // void UpdateAddHTLC_set_cltv_expiry(struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr, uint32_t val);
        public static native void UpdateAddHTLC_set_cltv_expiry(long this_ptr, int val);
+       // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
+       public static native long UpdateAddHTLC_clone(long orig);
        // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_ptr);
        public static native void UpdateFulfillHTLC_free(long this_ptr);
-       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
-       public static native long UpdateFulfillHTLC_clone(long orig);
        // 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);
@@ -1823,10 +2373,10 @@ public class bindings {
        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);
+       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
+       public static native long UpdateFulfillHTLC_clone(long orig);
        // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_ptr);
        public static native void UpdateFailHTLC_free(long this_ptr);
-       // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
-       public static native long UpdateFailHTLC_clone(long orig);
        // 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);
@@ -1835,10 +2385,10 @@ public class bindings {
        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);
        public static native void UpdateFailHTLC_set_htlc_id(long this_ptr, long val);
+       // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
+       public static native long UpdateFailHTLC_clone(long orig);
        // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_ptr);
        public static native void UpdateFailMalformedHTLC_free(long this_ptr);
-       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
-       public static native long UpdateFailMalformedHTLC_clone(long orig);
        // 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);
@@ -1851,10 +2401,10 @@ public class bindings {
        public static native short UpdateFailMalformedHTLC_get_failure_code(long this_ptr);
        // void UpdateFailMalformedHTLC_set_failure_code(struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr, uint16_t val);
        public static native void UpdateFailMalformedHTLC_set_failure_code(long this_ptr, short val);
+       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
+       public static native long UpdateFailMalformedHTLC_clone(long orig);
        // void CommitmentSigned_free(struct LDKCommitmentSigned this_ptr);
        public static native void CommitmentSigned_free(long this_ptr);
-       // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
-       public static native long CommitmentSigned_clone(long orig);
        // 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);
@@ -1867,10 +2417,10 @@ public class bindings {
        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 LDKSignature signature_arg, struct LDKCVec_SignatureZ htlc_signatures_arg);
        public static native long CommitmentSigned_new(byte[] channel_id_arg, byte[] signature_arg, byte[][] htlc_signatures_arg);
+       // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
+       public static native long CommitmentSigned_clone(long orig);
        // void RevokeAndACK_free(struct LDKRevokeAndACK this_ptr);
        public static native void RevokeAndACK_free(long this_ptr);
-       // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
-       public static native long RevokeAndACK_clone(long orig);
        // 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);
@@ -1885,10 +2435,10 @@ public class bindings {
        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);
+       // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
+       public static native long RevokeAndACK_clone(long orig);
        // void UpdateFee_free(struct LDKUpdateFee this_ptr);
        public static native void UpdateFee_free(long this_ptr);
-       // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
-       public static native long UpdateFee_clone(long orig);
        // 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);
@@ -1899,10 +2449,10 @@ public class bindings {
        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);
+       // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
+       public static native long UpdateFee_clone(long orig);
        // void DataLossProtect_free(struct LDKDataLossProtect this_ptr);
        public static native void DataLossProtect_free(long this_ptr);
-       // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
-       public static native long DataLossProtect_clone(long orig);
        // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
        public static native byte[] DataLossProtect_get_your_last_per_commitment_secret(long this_ptr);
        // void DataLossProtect_set_your_last_per_commitment_secret(struct LDKDataLossProtect *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -1913,10 +2463,10 @@ public class bindings {
        public static native void DataLossProtect_set_my_current_per_commitment_point(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKDataLossProtect DataLossProtect_new(struct LDKThirtyTwoBytes your_last_per_commitment_secret_arg, struct LDKPublicKey my_current_per_commitment_point_arg);
        public static native long DataLossProtect_new(byte[] your_last_per_commitment_secret_arg, byte[] my_current_per_commitment_point_arg);
+       // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
+       public static native long DataLossProtect_clone(long orig);
        // void ChannelReestablish_free(struct LDKChannelReestablish this_ptr);
        public static native void ChannelReestablish_free(long this_ptr);
-       // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
-       public static native long ChannelReestablish_clone(long orig);
        // 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);
@@ -1929,10 +2479,10 @@ public class bindings {
        public static native long ChannelReestablish_get_next_remote_commitment_number(long this_ptr);
        // void ChannelReestablish_set_next_remote_commitment_number(struct LDKChannelReestablish *NONNULL_PTR this_ptr, uint64_t val);
        public static native void ChannelReestablish_set_next_remote_commitment_number(long this_ptr, long val);
+       // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
+       public static native long ChannelReestablish_clone(long orig);
        // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_ptr);
        public static native void AnnouncementSignatures_free(long this_ptr);
-       // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
-       public static native long AnnouncementSignatures_clone(long orig);
        // 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);
@@ -1951,6 +2501,8 @@ public class bindings {
        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 LDKSignature node_signature_arg, struct LDKSignature 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);
+       // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
+       public static native long AnnouncementSignatures_clone(long orig);
        // void NetAddress_free(struct LDKNetAddress this_ptr);
        public static native void NetAddress_free(long this_ptr);
        // struct LDKNetAddress NetAddress_clone(const struct LDKNetAddress *NONNULL_PTR orig);
@@ -1961,8 +2513,6 @@ public class bindings {
        public static native long Result_read(byte[] ser);
        // void UnsignedNodeAnnouncement_free(struct LDKUnsignedNodeAnnouncement this_ptr);
        public static native void UnsignedNodeAnnouncement_free(long this_ptr);
-       // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
-       public static native long UnsignedNodeAnnouncement_clone(long orig);
        // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
        public static native long UnsignedNodeAnnouncement_get_features(long this_ptr);
        // void UnsignedNodeAnnouncement_set_features(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
@@ -1985,10 +2535,10 @@ public class bindings {
        public static native void UnsignedNodeAnnouncement_set_alias(long this_ptr, byte[] val);
        // void UnsignedNodeAnnouncement_set_addresses(struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKCVec_NetAddressZ val);
        public static native void UnsignedNodeAnnouncement_set_addresses(long this_ptr, long[] val);
+       // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
+       public static native long UnsignedNodeAnnouncement_clone(long orig);
        // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_ptr);
        public static native void NodeAnnouncement_free(long this_ptr);
-       // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
-       public static native long NodeAnnouncement_clone(long orig);
        // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
        public static native byte[] NodeAnnouncement_get_signature(long this_ptr);
        // void NodeAnnouncement_set_signature(struct LDKNodeAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
@@ -1999,10 +2549,10 @@ public class bindings {
        public static native void NodeAnnouncement_set_contents(long this_ptr, long val);
        // MUST_USE_RES struct LDKNodeAnnouncement NodeAnnouncement_new(struct LDKSignature signature_arg, struct LDKUnsignedNodeAnnouncement contents_arg);
        public static native long NodeAnnouncement_new(byte[] signature_arg, long contents_arg);
+       // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
+       public static native long NodeAnnouncement_clone(long orig);
        // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_ptr);
        public static native void UnsignedChannelAnnouncement_free(long this_ptr);
-       // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
-       public static native long UnsignedChannelAnnouncement_clone(long orig);
        // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
        public static native long UnsignedChannelAnnouncement_get_features(long this_ptr);
        // void UnsignedChannelAnnouncement_set_features(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKChannelFeatures val);
@@ -2031,10 +2581,10 @@ public class bindings {
        public static native byte[] UnsignedChannelAnnouncement_get_bitcoin_key_2(long this_ptr);
        // void UnsignedChannelAnnouncement_set_bitcoin_key_2(struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKPublicKey val);
        public static native void UnsignedChannelAnnouncement_set_bitcoin_key_2(long this_ptr, byte[] val);
+       // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
+       public static native long UnsignedChannelAnnouncement_clone(long orig);
        // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_ptr);
        public static native void ChannelAnnouncement_free(long this_ptr);
-       // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
-       public static native long ChannelAnnouncement_clone(long orig);
        // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
        public static native byte[] ChannelAnnouncement_get_node_signature_1(long this_ptr);
        // void ChannelAnnouncement_set_node_signature_1(struct LDKChannelAnnouncement *NONNULL_PTR this_ptr, struct LDKSignature val);
@@ -2057,10 +2607,10 @@ public class bindings {
        public static native void ChannelAnnouncement_set_contents(long this_ptr, long val);
        // MUST_USE_RES struct LDKChannelAnnouncement ChannelAnnouncement_new(struct LDKSignature node_signature_1_arg, struct LDKSignature node_signature_2_arg, struct LDKSignature bitcoin_signature_1_arg, struct LDKSignature bitcoin_signature_2_arg, struct LDKUnsignedChannelAnnouncement contents_arg);
        public static native long ChannelAnnouncement_new(byte[] node_signature_1_arg, byte[] node_signature_2_arg, byte[] bitcoin_signature_1_arg, byte[] bitcoin_signature_2_arg, long contents_arg);
+       // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
+       public static native long ChannelAnnouncement_clone(long orig);
        // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_ptr);
        public static native void UnsignedChannelUpdate_free(long this_ptr);
-       // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
-       public static native long UnsignedChannelUpdate_clone(long orig);
        // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
        public static native byte[] UnsignedChannelUpdate_get_chain_hash(long this_ptr);
        // void UnsignedChannelUpdate_set_chain_hash(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2093,10 +2643,10 @@ public class bindings {
        public static native int UnsignedChannelUpdate_get_fee_proportional_millionths(long this_ptr);
        // void UnsignedChannelUpdate_set_fee_proportional_millionths(struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr, uint32_t val);
        public static native void UnsignedChannelUpdate_set_fee_proportional_millionths(long this_ptr, int val);
+       // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
+       public static native long UnsignedChannelUpdate_clone(long orig);
        // void ChannelUpdate_free(struct LDKChannelUpdate this_ptr);
        public static native void ChannelUpdate_free(long this_ptr);
-       // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
-       public static native long ChannelUpdate_clone(long orig);
        // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
        public static native byte[] ChannelUpdate_get_signature(long this_ptr);
        // void ChannelUpdate_set_signature(struct LDKChannelUpdate *NONNULL_PTR this_ptr, struct LDKSignature val);
@@ -2107,10 +2657,10 @@ public class bindings {
        public static native void ChannelUpdate_set_contents(long this_ptr, long val);
        // MUST_USE_RES struct LDKChannelUpdate ChannelUpdate_new(struct LDKSignature signature_arg, struct LDKUnsignedChannelUpdate contents_arg);
        public static native long ChannelUpdate_new(byte[] signature_arg, long contents_arg);
+       // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
+       public static native long ChannelUpdate_clone(long orig);
        // void QueryChannelRange_free(struct LDKQueryChannelRange this_ptr);
        public static native void QueryChannelRange_free(long this_ptr);
-       // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
-       public static native long QueryChannelRange_clone(long orig);
        // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
        public static native byte[] QueryChannelRange_get_chain_hash(long this_ptr);
        // void QueryChannelRange_set_chain_hash(struct LDKQueryChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2125,10 +2675,10 @@ public class bindings {
        public static native void QueryChannelRange_set_number_of_blocks(long this_ptr, int val);
        // MUST_USE_RES struct LDKQueryChannelRange QueryChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg);
        public static native long QueryChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg);
+       // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
+       public static native long QueryChannelRange_clone(long orig);
        // void ReplyChannelRange_free(struct LDKReplyChannelRange this_ptr);
        public static native void ReplyChannelRange_free(long this_ptr);
-       // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
-       public static native long ReplyChannelRange_clone(long orig);
        // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
        public static native byte[] ReplyChannelRange_get_chain_hash(long this_ptr);
        // void ReplyChannelRange_set_chain_hash(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2141,18 +2691,18 @@ public class bindings {
        public static native int ReplyChannelRange_get_number_of_blocks(long this_ptr);
        // void ReplyChannelRange_set_number_of_blocks(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, uint32_t val);
        public static native void ReplyChannelRange_set_number_of_blocks(long this_ptr, int val);
-       // bool ReplyChannelRange_get_full_information(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
-       public static native boolean ReplyChannelRange_get_full_information(long this_ptr);
-       // void ReplyChannelRange_set_full_information(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
-       public static native void ReplyChannelRange_set_full_information(long this_ptr, boolean val);
+       // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
+       public static native boolean ReplyChannelRange_get_sync_complete(long this_ptr);
+       // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
+       public static native void ReplyChannelRange_set_sync_complete(long this_ptr, boolean val);
        // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
        public static native void ReplyChannelRange_set_short_channel_ids(long this_ptr, long[] val);
-       // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool full_information_arg, struct LDKCVec_u64Z short_channel_ids_arg);
-       public static native long ReplyChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean full_information_arg, long[] short_channel_ids_arg);
+       // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool sync_complete_arg, struct LDKCVec_u64Z short_channel_ids_arg);
+       public static native long ReplyChannelRange_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean sync_complete_arg, long[] short_channel_ids_arg);
+       // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
+       public static native long ReplyChannelRange_clone(long orig);
        // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_ptr);
        public static native void QueryShortChannelIds_free(long this_ptr);
-       // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
-       public static native long QueryShortChannelIds_clone(long orig);
        // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
        public static native byte[] QueryShortChannelIds_get_chain_hash(long this_ptr);
        // void QueryShortChannelIds_set_chain_hash(struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2161,10 +2711,10 @@ public class bindings {
        public static native void QueryShortChannelIds_set_short_channel_ids(long this_ptr, long[] val);
        // MUST_USE_RES struct LDKQueryShortChannelIds QueryShortChannelIds_new(struct LDKThirtyTwoBytes chain_hash_arg, struct LDKCVec_u64Z short_channel_ids_arg);
        public static native long QueryShortChannelIds_new(byte[] chain_hash_arg, long[] short_channel_ids_arg);
+       // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
+       public static native long QueryShortChannelIds_clone(long orig);
        // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_ptr);
        public static native void ReplyShortChannelIdsEnd_free(long this_ptr);
-       // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
-       public static native long ReplyShortChannelIdsEnd_clone(long orig);
        // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
        public static native byte[] ReplyShortChannelIdsEnd_get_chain_hash(long this_ptr);
        // void ReplyShortChannelIdsEnd_set_chain_hash(struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2175,10 +2725,10 @@ public class bindings {
        public static native void ReplyShortChannelIdsEnd_set_full_information(long this_ptr, boolean val);
        // MUST_USE_RES struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_new(struct LDKThirtyTwoBytes chain_hash_arg, bool full_information_arg);
        public static native long ReplyShortChannelIdsEnd_new(byte[] chain_hash_arg, boolean full_information_arg);
+       // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
+       public static native long ReplyShortChannelIdsEnd_clone(long orig);
        // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_ptr);
        public static native void GossipTimestampFilter_free(long this_ptr);
-       // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
-       public static native long GossipTimestampFilter_clone(long orig);
        // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
        public static native byte[] GossipTimestampFilter_get_chain_hash(long this_ptr);
        // void GossipTimestampFilter_set_chain_hash(struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
@@ -2193,14 +2743,14 @@ public class bindings {
        public static native void GossipTimestampFilter_set_timestamp_range(long this_ptr, int val);
        // MUST_USE_RES struct LDKGossipTimestampFilter GossipTimestampFilter_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_timestamp_arg, uint32_t timestamp_range_arg);
        public static native long GossipTimestampFilter_new(byte[] chain_hash_arg, int first_timestamp_arg, int timestamp_range_arg);
+       // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
+       public static native long GossipTimestampFilter_clone(long orig);
        // void ErrorAction_free(struct LDKErrorAction this_ptr);
        public static native void ErrorAction_free(long this_ptr);
        // struct LDKErrorAction ErrorAction_clone(const struct LDKErrorAction *NONNULL_PTR orig);
        public static native long ErrorAction_clone(long orig);
        // void LightningError_free(struct LDKLightningError this_ptr);
        public static native void LightningError_free(long this_ptr);
-       // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
-       public static native long LightningError_clone(long orig);
        // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
        public static native String LightningError_get_err(long this_ptr);
        // void LightningError_set_err(struct LDKLightningError *NONNULL_PTR this_ptr, struct LDKCVec_u8Z val);
@@ -2211,10 +2761,10 @@ public class bindings {
        public static native void LightningError_set_action(long this_ptr, long val);
        // MUST_USE_RES struct LDKLightningError LightningError_new(struct LDKCVec_u8Z err_arg, struct LDKErrorAction action_arg);
        public static native long LightningError_new(byte[] err_arg, long action_arg);
+       // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
+       public static native long LightningError_clone(long orig);
        // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_ptr);
        public static native void CommitmentUpdate_free(long this_ptr);
-       // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
-       public static native long CommitmentUpdate_clone(long orig);
        // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
        public static native void CommitmentUpdate_set_update_add_htlcs(long this_ptr, long[] val);
        // void CommitmentUpdate_set_update_fulfill_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateFulfillHTLCZ val);
@@ -2233,6 +2783,8 @@ public class bindings {
        public static native void CommitmentUpdate_set_commitment_signed(long this_ptr, long val);
        // MUST_USE_RES struct LDKCommitmentUpdate CommitmentUpdate_new(struct LDKCVec_UpdateAddHTLCZ update_add_htlcs_arg, struct LDKCVec_UpdateFulfillHTLCZ update_fulfill_htlcs_arg, struct LDKCVec_UpdateFailHTLCZ update_fail_htlcs_arg, struct LDKCVec_UpdateFailMalformedHTLCZ update_fail_malformed_htlcs_arg, struct LDKUpdateFee update_fee_arg, struct LDKCommitmentSigned commitment_signed_arg);
        public static native long CommitmentUpdate_new(long[] update_add_htlcs_arg, long[] update_fulfill_htlcs_arg, long[] update_fail_htlcs_arg, long[] update_fail_malformed_htlcs_arg, long update_fee_arg, long commitment_signed_arg);
+       // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
+       public static native long CommitmentUpdate_clone(long orig);
        // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
        public static native void HTLCFailChannelUpdate_free(long this_ptr);
        // struct LDKHTLCFailChannelUpdate HTLCFailChannelUpdate_clone(const struct LDKHTLCFailChannelUpdate *NONNULL_PTR orig);
@@ -2243,11 +2795,11 @@ public class bindings {
        public static native void RoutingMessageHandler_free(long this_ptr);
        // struct LDKCVec_u8Z AcceptChannel_write(const struct LDKAcceptChannel *NONNULL_PTR obj);
        public static native byte[] AcceptChannel_write(long obj);
-       // struct LDKAcceptChannel AcceptChannel_read(struct LDKu8slice ser);
+       // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
        public static native long AcceptChannel_read(byte[] ser);
        // struct LDKCVec_u8Z AnnouncementSignatures_write(const struct LDKAnnouncementSignatures *NONNULL_PTR obj);
        public static native byte[] AnnouncementSignatures_write(long obj);
-       // struct LDKAnnouncementSignatures AnnouncementSignatures_read(struct LDKu8slice ser);
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
        public static native long AnnouncementSignatures_read(byte[] ser);
        // struct LDKCVec_u8Z ChannelReestablish_write(const struct LDKChannelReestablish *NONNULL_PTR obj);
        public static native byte[] ChannelReestablish_write(long obj);
@@ -2255,23 +2807,23 @@ public class bindings {
        public static native long ChannelReestablish_read(byte[] ser);
        // struct LDKCVec_u8Z ClosingSigned_write(const struct LDKClosingSigned *NONNULL_PTR obj);
        public static native byte[] ClosingSigned_write(long obj);
-       // struct LDKClosingSigned ClosingSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
        public static native long ClosingSigned_read(byte[] ser);
        // struct LDKCVec_u8Z CommitmentSigned_write(const struct LDKCommitmentSigned *NONNULL_PTR obj);
        public static native byte[] CommitmentSigned_write(long obj);
-       // struct LDKCommitmentSigned CommitmentSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
        public static native long CommitmentSigned_read(byte[] ser);
        // struct LDKCVec_u8Z FundingCreated_write(const struct LDKFundingCreated *NONNULL_PTR obj);
        public static native byte[] FundingCreated_write(long obj);
-       // struct LDKFundingCreated FundingCreated_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
        public static native long FundingCreated_read(byte[] ser);
        // struct LDKCVec_u8Z FundingSigned_write(const struct LDKFundingSigned *NONNULL_PTR obj);
        public static native byte[] FundingSigned_write(long obj);
-       // struct LDKFundingSigned FundingSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
        public static native long FundingSigned_read(byte[] ser);
        // struct LDKCVec_u8Z FundingLocked_write(const struct LDKFundingLocked *NONNULL_PTR obj);
        public static native byte[] FundingLocked_write(long obj);
-       // struct LDKFundingLocked FundingLocked_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
        public static native long FundingLocked_read(byte[] ser);
        // struct LDKCVec_u8Z Init_write(const struct LDKInit *NONNULL_PTR obj);
        public static native byte[] Init_write(long obj);
@@ -2279,35 +2831,35 @@ public class bindings {
        public static native long Init_read(byte[] ser);
        // struct LDKCVec_u8Z OpenChannel_write(const struct LDKOpenChannel *NONNULL_PTR obj);
        public static native byte[] OpenChannel_write(long obj);
-       // struct LDKOpenChannel OpenChannel_read(struct LDKu8slice ser);
+       // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
        public static native long OpenChannel_read(byte[] ser);
        // struct LDKCVec_u8Z RevokeAndACK_write(const struct LDKRevokeAndACK *NONNULL_PTR obj);
        public static native byte[] RevokeAndACK_write(long obj);
-       // struct LDKRevokeAndACK RevokeAndACK_read(struct LDKu8slice ser);
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
        public static native long RevokeAndACK_read(byte[] ser);
        // struct LDKCVec_u8Z Shutdown_write(const struct LDKShutdown *NONNULL_PTR obj);
        public static native byte[] Shutdown_write(long obj);
-       // struct LDKShutdown Shutdown_read(struct LDKu8slice ser);
+       // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
        public static native long Shutdown_read(byte[] ser);
        // struct LDKCVec_u8Z UpdateFailHTLC_write(const struct LDKUpdateFailHTLC *NONNULL_PTR obj);
        public static native byte[] UpdateFailHTLC_write(long obj);
-       // struct LDKUpdateFailHTLC UpdateFailHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
        public static native long UpdateFailHTLC_read(byte[] ser);
        // struct LDKCVec_u8Z UpdateFailMalformedHTLC_write(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR obj);
        public static native byte[] UpdateFailMalformedHTLC_write(long obj);
-       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
        public static native long UpdateFailMalformedHTLC_read(byte[] ser);
        // struct LDKCVec_u8Z UpdateFee_write(const struct LDKUpdateFee *NONNULL_PTR obj);
        public static native byte[] UpdateFee_write(long obj);
-       // struct LDKUpdateFee UpdateFee_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
        public static native long UpdateFee_read(byte[] ser);
        // struct LDKCVec_u8Z UpdateFulfillHTLC_write(const struct LDKUpdateFulfillHTLC *NONNULL_PTR obj);
        public static native byte[] UpdateFulfillHTLC_write(long obj);
-       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
        public static native long UpdateFulfillHTLC_read(byte[] ser);
        // struct LDKCVec_u8Z UpdateAddHTLC_write(const struct LDKUpdateAddHTLC *NONNULL_PTR obj);
        public static native byte[] UpdateAddHTLC_write(long obj);
-       // struct LDKUpdateAddHTLC UpdateAddHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
        public static native long UpdateAddHTLC_read(byte[] ser);
        // struct LDKCVec_u8Z Ping_write(const struct LDKPing *NONNULL_PTR obj);
        public static native byte[] Ping_write(long obj);
@@ -2323,7 +2875,7 @@ public class bindings {
        public static native long UnsignedChannelAnnouncement_read(byte[] ser);
        // struct LDKCVec_u8Z ChannelAnnouncement_write(const struct LDKChannelAnnouncement *NONNULL_PTR obj);
        public static native byte[] ChannelAnnouncement_write(long obj);
-       // struct LDKChannelAnnouncement ChannelAnnouncement_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
        public static native long ChannelAnnouncement_read(byte[] ser);
        // struct LDKCVec_u8Z UnsignedChannelUpdate_write(const struct LDKUnsignedChannelUpdate *NONNULL_PTR obj);
        public static native byte[] UnsignedChannelUpdate_write(long obj);
@@ -2331,7 +2883,7 @@ public class bindings {
        public static native long UnsignedChannelUpdate_read(byte[] ser);
        // struct LDKCVec_u8Z ChannelUpdate_write(const struct LDKChannelUpdate *NONNULL_PTR obj);
        public static native byte[] ChannelUpdate_write(long obj);
-       // struct LDKChannelUpdate ChannelUpdate_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
        public static native long ChannelUpdate_read(byte[] ser);
        // struct LDKCVec_u8Z ErrorMessage_write(const struct LDKErrorMessage *NONNULL_PTR obj);
        public static native byte[] ErrorMessage_write(long obj);
@@ -2343,7 +2895,7 @@ public class bindings {
        public static native long UnsignedNodeAnnouncement_read(byte[] ser);
        // struct LDKCVec_u8Z NodeAnnouncement_write(const struct LDKNodeAnnouncement *NONNULL_PTR obj);
        public static native byte[] NodeAnnouncement_write(long obj);
-       // struct LDKNodeAnnouncement NodeAnnouncement_read(struct LDKu8slice ser);
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
        public static native long NodeAnnouncement_read(byte[] ser);
        // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ QueryShortChannelIds_read(struct LDKu8slice ser);
        public static native long QueryShortChannelIds_read(byte[] ser);
@@ -2365,6 +2917,22 @@ public class bindings {
        public static native long GossipTimestampFilter_read(byte[] ser);
        // struct LDKCVec_u8Z GossipTimestampFilter_write(const struct LDKGossipTimestampFilter *NONNULL_PTR obj);
        public static native byte[] GossipTimestampFilter_write(long obj);
+       // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_ptr);
+       public static native void IgnoringMessageHandler_free(long this_ptr);
+       // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
+       public static native long IgnoringMessageHandler_new();
+       // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+       public static native long IgnoringMessageHandler_as_MessageSendEventsProvider(long this_arg);
+       // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+       public static native long IgnoringMessageHandler_as_RoutingMessageHandler(long this_arg);
+       // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_ptr);
+       public static native void ErroringMessageHandler_free(long this_ptr);
+       // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
+       public static native long ErroringMessageHandler_new();
+       // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
+       public static native long ErroringMessageHandler_as_MessageSendEventsProvider(long this_arg);
+       // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
+       public static native long ErroringMessageHandler_as_ChannelMessageHandler(long this_arg);
        // void MessageHandler_free(struct LDKMessageHandler this_ptr);
        public static native void MessageHandler_free(long this_ptr);
        // const struct LDKChannelMessageHandler *MessageHandler_get_chan_handler(const struct LDKMessageHandler *NONNULL_PTR this_ptr);
@@ -2383,14 +2951,14 @@ public class bindings {
        public static native void SocketDescriptor_free(long this_ptr);
        // void PeerHandleError_free(struct LDKPeerHandleError this_ptr);
        public static native void PeerHandleError_free(long this_ptr);
-       // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
-       public static native long PeerHandleError_clone(long orig);
        // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
        public static native boolean PeerHandleError_get_no_connection_possible(long this_ptr);
        // void PeerHandleError_set_no_connection_possible(struct LDKPeerHandleError *NONNULL_PTR this_ptr, bool val);
        public static native void PeerHandleError_set_no_connection_possible(long this_ptr, boolean val);
        // MUST_USE_RES struct LDKPeerHandleError PeerHandleError_new(bool no_connection_possible_arg);
        public static native long PeerHandleError_new(boolean no_connection_possible_arg);
+       // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
+       public static native long PeerHandleError_clone(long orig);
        // void PeerManager_free(struct LDKPeerManager this_ptr);
        public static native void PeerManager_free(long this_ptr);
        // MUST_USE_RES struct LDKPeerManager PeerManager_new(struct LDKMessageHandler message_handler, struct LDKSecretKey our_node_secret, const uint8_t (*ephemeral_random_data)[32], struct LDKLogger logger);
@@ -2415,18 +2983,16 @@ public class bindings {
        public static native void PeerManager_timer_tick_occured(long this_arg);
        // struct LDKThirtyTwoBytes build_commitment_secret(const uint8_t (*commitment_seed)[32], uint64_t idx);
        public static native byte[] build_commitment_secret(byte[] commitment_seed, long idx);
-       // struct LDKCResult_SecretKeySecpErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
+       // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
        public static native long derive_private_key(byte[] per_commitment_point, byte[] base_secret);
-       // struct LDKCResult_PublicKeySecpErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
+       // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
        public static native long derive_public_key(byte[] per_commitment_point, byte[] base_point);
-       // struct LDKCResult_SecretKeySecpErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
+       // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
        public static native long derive_private_revocation_key(byte[] per_commitment_secret, byte[] countersignatory_revocation_base_secret);
-       // struct LDKCResult_PublicKeySecpErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
+       // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
        public static native long derive_public_revocation_key(byte[] per_commitment_point, byte[] countersignatory_revocation_base_point);
        // void TxCreationKeys_free(struct LDKTxCreationKeys this_ptr);
        public static native void TxCreationKeys_free(long this_ptr);
-       // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
-       public static native long TxCreationKeys_clone(long orig);
        // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
        public static native byte[] TxCreationKeys_get_per_commitment_point(long this_ptr);
        // void TxCreationKeys_set_per_commitment_point(struct LDKTxCreationKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
@@ -2449,14 +3015,14 @@ public class bindings {
        public static native void TxCreationKeys_set_broadcaster_delayed_payment_key(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKTxCreationKeys TxCreationKeys_new(struct LDKPublicKey per_commitment_point_arg, struct LDKPublicKey revocation_key_arg, struct LDKPublicKey broadcaster_htlc_key_arg, struct LDKPublicKey countersignatory_htlc_key_arg, struct LDKPublicKey broadcaster_delayed_payment_key_arg);
        public static native long TxCreationKeys_new(byte[] per_commitment_point_arg, byte[] revocation_key_arg, byte[] broadcaster_htlc_key_arg, byte[] countersignatory_htlc_key_arg, byte[] broadcaster_delayed_payment_key_arg);
+       // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
+       public static native long TxCreationKeys_clone(long orig);
        // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
        public static native byte[] TxCreationKeys_write(long obj);
-       // struct LDKTxCreationKeys TxCreationKeys_read(struct LDKu8slice ser);
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
        public static native long TxCreationKeys_read(byte[] ser);
        // void ChannelPublicKeys_free(struct LDKChannelPublicKeys this_ptr);
        public static native void ChannelPublicKeys_free(long this_ptr);
-       // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
-       public static native long ChannelPublicKeys_clone(long orig);
        // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
        public static native byte[] ChannelPublicKeys_get_funding_pubkey(long this_ptr);
        // void ChannelPublicKeys_set_funding_pubkey(struct LDKChannelPublicKeys *NONNULL_PTR this_ptr, struct LDKPublicKey val);
@@ -2479,20 +3045,20 @@ public class bindings {
        public static native void ChannelPublicKeys_set_htlc_basepoint(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKChannelPublicKeys ChannelPublicKeys_new(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);
        public static native long ChannelPublicKeys_new(byte[] funding_pubkey_arg, byte[] revocation_basepoint_arg, byte[] payment_point_arg, byte[] delayed_payment_basepoint_arg, byte[] htlc_basepoint_arg);
+       // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
+       public static native long ChannelPublicKeys_clone(long orig);
        // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
        public static native byte[] ChannelPublicKeys_write(long obj);
-       // struct LDKChannelPublicKeys ChannelPublicKeys_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
        public static native long ChannelPublicKeys_read(byte[] ser);
-       // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
+       // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
        public static native long TxCreationKeys_derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base);
-       // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
+       // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
        public static native long TxCreationKeys_from_channel_static_keys(byte[] per_commitment_point, long broadcaster_keys, long countersignatory_keys);
        // struct LDKCVec_u8Z get_revokeable_redeemscript(struct LDKPublicKey revocation_key, uint16_t contest_delay, struct LDKPublicKey broadcaster_delayed_payment_key);
        public static native byte[] get_revokeable_redeemscript(byte[] revocation_key, short contest_delay, byte[] broadcaster_delayed_payment_key);
        // void HTLCOutputInCommitment_free(struct LDKHTLCOutputInCommitment this_ptr);
        public static native void HTLCOutputInCommitment_free(long this_ptr);
-       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
-       public static native long HTLCOutputInCommitment_clone(long orig);
        // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
        public static native boolean HTLCOutputInCommitment_get_offered(long this_ptr);
        // void HTLCOutputInCommitment_set_offered(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, bool val);
@@ -2509,9 +3075,11 @@ public class bindings {
        public static native byte[] HTLCOutputInCommitment_get_payment_hash(long this_ptr);
        // void HTLCOutputInCommitment_set_payment_hash(struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
        public static native void HTLCOutputInCommitment_set_payment_hash(long this_ptr, byte[] val);
+       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
+       public static native long HTLCOutputInCommitment_clone(long orig);
        // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
        public static native byte[] HTLCOutputInCommitment_write(long obj);
-       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_read(struct LDKu8slice ser);
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
        public static native long HTLCOutputInCommitment_read(byte[] ser);
        // struct LDKCVec_u8Z get_htlc_redeemscript(const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc, const struct LDKTxCreationKeys *NONNULL_PTR keys);
        public static native byte[] get_htlc_redeemscript(long htlc, long keys);
@@ -2521,8 +3089,6 @@ public class bindings {
        public static native byte[] build_htlc_transaction(byte[] prev_hash, int feerate_per_kw, short contest_delay, long htlc, byte[] broadcaster_delayed_payment_key, byte[] revocation_key);
        // void ChannelTransactionParameters_free(struct LDKChannelTransactionParameters this_ptr);
        public static native void ChannelTransactionParameters_free(long this_ptr);
-       // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
-       public static native long ChannelTransactionParameters_clone(long orig);
        // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
        public static native long ChannelTransactionParameters_get_holder_pubkeys(long this_ptr);
        // void ChannelTransactionParameters_set_holder_pubkeys(struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
@@ -2545,10 +3111,10 @@ public class bindings {
        public static native void ChannelTransactionParameters_set_funding_outpoint(long this_ptr, long val);
        // MUST_USE_RES struct LDKChannelTransactionParameters ChannelTransactionParameters_new(struct LDKChannelPublicKeys holder_pubkeys_arg, uint16_t holder_selected_contest_delay_arg, bool is_outbound_from_holder_arg, struct LDKCounterpartyChannelTransactionParameters counterparty_parameters_arg, struct LDKOutPoint funding_outpoint_arg);
        public static native long ChannelTransactionParameters_new(long holder_pubkeys_arg, short holder_selected_contest_delay_arg, boolean is_outbound_from_holder_arg, long counterparty_parameters_arg, long funding_outpoint_arg);
+       // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
+       public static native long ChannelTransactionParameters_clone(long orig);
        // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_ptr);
        public static native void CounterpartyChannelTransactionParameters_free(long this_ptr);
-       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
-       public static native long CounterpartyChannelTransactionParameters_clone(long orig);
        // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
        public static native long CounterpartyChannelTransactionParameters_get_pubkeys(long this_ptr);
        // void CounterpartyChannelTransactionParameters_set_pubkeys(struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr, struct LDKChannelPublicKeys val);
@@ -2559,6 +3125,8 @@ public class bindings {
        public static native void CounterpartyChannelTransactionParameters_set_selected_contest_delay(long this_ptr, short val);
        // MUST_USE_RES struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_new(struct LDKChannelPublicKeys pubkeys_arg, uint16_t selected_contest_delay_arg);
        public static native long CounterpartyChannelTransactionParameters_new(long pubkeys_arg, short selected_contest_delay_arg);
+       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
+       public static native long CounterpartyChannelTransactionParameters_clone(long orig);
        // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
        public static native boolean ChannelTransactionParameters_is_populated(long this_arg);
        // MUST_USE_RES struct LDKDirectedChannelTransactionParameters ChannelTransactionParameters_as_holder_broadcastable(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
@@ -2567,11 +3135,11 @@ public class bindings {
        public static native long ChannelTransactionParameters_as_counterparty_broadcastable(long this_arg);
        // struct LDKCVec_u8Z CounterpartyChannelTransactionParameters_write(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR obj);
        public static native byte[] CounterpartyChannelTransactionParameters_write(long obj);
-       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
        public static native long CounterpartyChannelTransactionParameters_read(byte[] ser);
        // struct LDKCVec_u8Z ChannelTransactionParameters_write(const struct LDKChannelTransactionParameters *NONNULL_PTR obj);
        public static native byte[] ChannelTransactionParameters_write(long obj);
-       // struct LDKChannelTransactionParameters ChannelTransactionParameters_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
        public static native long ChannelTransactionParameters_read(byte[] ser);
        // void DirectedChannelTransactionParameters_free(struct LDKDirectedChannelTransactionParameters this_ptr);
        public static native void DirectedChannelTransactionParameters_free(long this_ptr);
@@ -2587,24 +3155,22 @@ public class bindings {
        public static native long DirectedChannelTransactionParameters_funding_outpoint(long this_arg);
        // void HolderCommitmentTransaction_free(struct LDKHolderCommitmentTransaction this_ptr);
        public static native void HolderCommitmentTransaction_free(long this_ptr);
-       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
-       public static native long HolderCommitmentTransaction_clone(long orig);
        // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
        public static native byte[] HolderCommitmentTransaction_get_counterparty_sig(long this_ptr);
        // void HolderCommitmentTransaction_set_counterparty_sig(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKSignature val);
        public static native void HolderCommitmentTransaction_set_counterparty_sig(long this_ptr, byte[] val);
        // void HolderCommitmentTransaction_set_counterparty_htlc_sigs(struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKCVec_SignatureZ val);
        public static native void HolderCommitmentTransaction_set_counterparty_htlc_sigs(long this_ptr, byte[][] val);
+       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
+       public static native long HolderCommitmentTransaction_clone(long orig);
        // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
        public static native byte[] HolderCommitmentTransaction_write(long obj);
-       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
        public static native long HolderCommitmentTransaction_read(byte[] ser);
        // MUST_USE_RES struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_new(struct LDKCommitmentTransaction commitment_tx, struct LDKSignature counterparty_sig, struct LDKCVec_SignatureZ counterparty_htlc_sigs, struct LDKPublicKey holder_funding_key, struct LDKPublicKey counterparty_funding_key);
        public static native long HolderCommitmentTransaction_new(long commitment_tx, byte[] counterparty_sig, byte[][] counterparty_htlc_sigs, byte[] holder_funding_key, byte[] counterparty_funding_key);
        // void BuiltCommitmentTransaction_free(struct LDKBuiltCommitmentTransaction this_ptr);
        public static native void BuiltCommitmentTransaction_free(long this_ptr);
-       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
-       public static native long BuiltCommitmentTransaction_clone(long orig);
        // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
        public static native byte[] BuiltCommitmentTransaction_get_transaction(long this_ptr);
        // void BuiltCommitmentTransaction_set_transaction(struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr, struct LDKTransaction val);
@@ -2615,9 +3181,11 @@ public class bindings {
        public static native void BuiltCommitmentTransaction_set_txid(long this_ptr, byte[] val);
        // MUST_USE_RES struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_new(struct LDKTransaction transaction_arg, struct LDKThirtyTwoBytes txid_arg);
        public static native long BuiltCommitmentTransaction_new(byte[] transaction_arg, byte[] txid_arg);
+       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
+       public static native long BuiltCommitmentTransaction_clone(long orig);
        // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
        public static native byte[] BuiltCommitmentTransaction_write(long obj);
-       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
        public static native long BuiltCommitmentTransaction_read(byte[] ser);
        // MUST_USE_RES struct LDKThirtyTwoBytes BuiltCommitmentTransaction_get_sighash_all(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_arg, struct LDKu8slice funding_redeemscript, uint64_t channel_value_satoshis);
        public static native byte[] BuiltCommitmentTransaction_get_sighash_all(long this_arg, byte[] funding_redeemscript, long channel_value_satoshis);
@@ -2629,7 +3197,7 @@ public class bindings {
        public static native long CommitmentTransaction_clone(long orig);
        // struct LDKCVec_u8Z CommitmentTransaction_write(const struct LDKCommitmentTransaction *NONNULL_PTR obj);
        public static native byte[] CommitmentTransaction_write(long obj);
-       // struct LDKCommitmentTransaction CommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
        public static native long CommitmentTransaction_read(byte[] ser);
        // MUST_USE_RES uint64_t CommitmentTransaction_commitment_number(const struct LDKCommitmentTransaction *NONNULL_PTR this_arg);
        public static native long CommitmentTransaction_commitment_number(long this_arg);
@@ -2655,16 +3223,44 @@ public class bindings {
        public static native long TrustedCommitmentTransaction_get_htlc_sigs(long this_arg, byte[] htlc_base_key, long channel_parameters);
        // uint64_t get_commitment_transaction_number_obscure_factor(struct LDKPublicKey broadcaster_payment_basepoint, struct LDKPublicKey countersignatory_payment_basepoint, bool outbound_from_broadcaster);
        public static native long get_commitment_transaction_number_obscure_factor(byte[] broadcaster_payment_basepoint, byte[] countersignatory_payment_basepoint, boolean outbound_from_broadcaster);
+       // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
+       public static native long InitFeatures_clone(long orig);
+       // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
+       public static native long NodeFeatures_clone(long orig);
+       // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
+       public static native long ChannelFeatures_clone(long orig);
        // void InitFeatures_free(struct LDKInitFeatures this_ptr);
        public static native void InitFeatures_free(long this_ptr);
        // void NodeFeatures_free(struct LDKNodeFeatures this_ptr);
        public static native void NodeFeatures_free(long this_ptr);
        // void ChannelFeatures_free(struct LDKChannelFeatures this_ptr);
        public static native void ChannelFeatures_free(long this_ptr);
+       // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
+       public static native long InitFeatures_empty();
+       // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
+       public static native long InitFeatures_known();
+       // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
+       public static native long NodeFeatures_empty();
+       // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
+       public static native long NodeFeatures_known();
+       // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
+       public static native long ChannelFeatures_empty();
+       // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
+       public static native long ChannelFeatures_known();
+       // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
+       public static native byte[] InitFeatures_write(long obj);
+       // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
+       public static native byte[] NodeFeatures_write(long obj);
+       // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
+       public static native byte[] ChannelFeatures_write(long obj);
+       // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
+       public static native long InitFeatures_read(byte[] ser);
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
+       public static native long NodeFeatures_read(byte[] ser);
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
+       public static native long ChannelFeatures_read(byte[] ser);
        // void RouteHop_free(struct LDKRouteHop this_ptr);
        public static native void RouteHop_free(long this_ptr);
-       // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
-       public static native long RouteHop_clone(long orig);
        // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
        public static native byte[] RouteHop_get_pubkey(long this_ptr);
        // void RouteHop_set_pubkey(struct LDKRouteHop *NONNULL_PTR this_ptr, struct LDKPublicKey val);
@@ -2691,22 +3287,22 @@ public class bindings {
        public static native void RouteHop_set_cltv_expiry_delta(long this_ptr, int val);
        // MUST_USE_RES struct LDKRouteHop RouteHop_new(struct LDKPublicKey pubkey_arg, struct LDKNodeFeatures node_features_arg, uint64_t short_channel_id_arg, struct LDKChannelFeatures channel_features_arg, uint64_t fee_msat_arg, uint32_t cltv_expiry_delta_arg);
        public static native long RouteHop_new(byte[] pubkey_arg, long node_features_arg, long short_channel_id_arg, long channel_features_arg, long fee_msat_arg, int cltv_expiry_delta_arg);
+       // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
+       public static native long RouteHop_clone(long orig);
        // void Route_free(struct LDKRoute this_ptr);
        public static native void Route_free(long this_ptr);
-       // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
-       public static native long Route_clone(long orig);
        // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
        public static native void Route_set_paths(long this_ptr, long[][] val);
        // MUST_USE_RES struct LDKRoute Route_new(struct LDKCVec_CVec_RouteHopZZ paths_arg);
        public static native long Route_new(long[][] paths_arg);
+       // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
+       public static native long Route_clone(long orig);
        // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
        public static native byte[] Route_write(long obj);
        // struct LDKCResult_RouteDecodeErrorZ Route_read(struct LDKu8slice ser);
        public static native long Route_read(byte[] ser);
        // void RouteHint_free(struct LDKRouteHint this_ptr);
        public static native void RouteHint_free(long this_ptr);
-       // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
-       public static native long RouteHint_clone(long orig);
        // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
        public static native byte[] RouteHint_get_src_node_id(long this_ptr);
        // void RouteHint_set_src_node_id(struct LDKRouteHint *NONNULL_PTR this_ptr, struct LDKPublicKey val);
@@ -2723,16 +3319,14 @@ public class bindings {
        public static native short RouteHint_get_cltv_expiry_delta(long this_ptr);
        // void RouteHint_set_cltv_expiry_delta(struct LDKRouteHint *NONNULL_PTR this_ptr, uint16_t val);
        public static native void RouteHint_set_cltv_expiry_delta(long this_ptr, short val);
-       // uint64_t RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
-       public static native long RouteHint_get_htlc_minimum_msat(long this_ptr);
-       // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
-       public static native void RouteHint_set_htlc_minimum_msat(long this_ptr, long val);
-       // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg);
-       public static native long RouteHint_new(byte[] src_node_id_arg, long short_channel_id_arg, long fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg);
-       // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey target, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
-       public static native long get_route(byte[] our_node_id, long network, byte[] target, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger);
+       // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
+       public static native long RouteHint_clone(long orig);
+       // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
+       public static native long get_route(byte[] our_node_id, long network, byte[] payee, long[] first_hops, long[] last_hops, long final_value_msat, int final_cltv, long logger);
        // void NetworkGraph_free(struct LDKNetworkGraph this_ptr);
        public static native void NetworkGraph_free(long this_ptr);
+       // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
+       public static native long NetworkGraph_clone(long orig);
        // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_ptr);
        public static native void LockedNetworkGraph_free(long this_ptr);
        // void NetGraphMsgHandler_free(struct LDKNetGraphMsgHandler this_ptr);
@@ -2741,6 +3335,8 @@ public class bindings {
        public static native long NetGraphMsgHandler_new(byte[] genesis_hash, long chain_access, long logger);
        // MUST_USE_RES struct LDKNetGraphMsgHandler NetGraphMsgHandler_from_net_graph(struct LDKAccess *chain_access, struct LDKLogger logger, struct LDKNetworkGraph network_graph);
        public static native long NetGraphMsgHandler_from_net_graph(long chain_access, long logger, long network_graph);
+       // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
+       public static native void NetGraphMsgHandler_add_chain_access(long this_arg, long chain_access);
        // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
        public static native long NetGraphMsgHandler_read_locked_graph(long this_arg);
        // MUST_USE_RES struct LDKNetworkGraph LockedNetworkGraph_graph(const struct LDKLockedNetworkGraph *NONNULL_PTR this_arg);
@@ -2751,8 +3347,6 @@ public class bindings {
        public static native long NetGraphMsgHandler_as_MessageSendEventsProvider(long this_arg);
        // void DirectionalChannelInfo_free(struct LDKDirectionalChannelInfo this_ptr);
        public static native void DirectionalChannelInfo_free(long this_ptr);
-       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
-       public static native long DirectionalChannelInfo_clone(long orig);
        // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
        public static native int DirectionalChannelInfo_get_last_update(long this_ptr);
        // void DirectionalChannelInfo_set_last_update(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, uint32_t val);
@@ -2777,9 +3371,11 @@ public class bindings {
        public static native long DirectionalChannelInfo_get_last_update_message(long this_ptr);
        // void DirectionalChannelInfo_set_last_update_message(struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelUpdate val);
        public static native void DirectionalChannelInfo_set_last_update_message(long this_ptr, long val);
+       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
+       public static native long DirectionalChannelInfo_clone(long orig);
        // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
        public static native byte[] DirectionalChannelInfo_write(long obj);
-       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_read(struct LDKu8slice ser);
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
        public static native long DirectionalChannelInfo_read(byte[] ser);
        // void ChannelInfo_free(struct LDKChannelInfo this_ptr);
        public static native void ChannelInfo_free(long this_ptr);
@@ -2807,14 +3403,14 @@ public class bindings {
        public static native long ChannelInfo_get_announcement_message(long this_ptr);
        // void ChannelInfo_set_announcement_message(struct LDKChannelInfo *NONNULL_PTR this_ptr, struct LDKChannelAnnouncement val);
        public static native void ChannelInfo_set_announcement_message(long this_ptr, long val);
+       // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
+       public static native long ChannelInfo_clone(long orig);
        // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
        public static native byte[] ChannelInfo_write(long obj);
-       // struct LDKChannelInfo ChannelInfo_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
        public static native long ChannelInfo_read(byte[] ser);
        // void RoutingFees_free(struct LDKRoutingFees this_ptr);
        public static native void RoutingFees_free(long this_ptr);
-       // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
-       public static native long RoutingFees_clone(long orig);
        // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
        public static native int RoutingFees_get_base_msat(long this_ptr);
        // void RoutingFees_set_base_msat(struct LDKRoutingFees *NONNULL_PTR this_ptr, uint32_t val);
@@ -2825,14 +3421,14 @@ public class bindings {
        public static native void RoutingFees_set_proportional_millionths(long this_ptr, int val);
        // MUST_USE_RES struct LDKRoutingFees RoutingFees_new(uint32_t base_msat_arg, uint32_t proportional_millionths_arg);
        public static native long RoutingFees_new(int base_msat_arg, int proportional_millionths_arg);
+       // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
+       public static native long RoutingFees_clone(long orig);
        // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
        public static native long RoutingFees_read(byte[] ser);
        // struct LDKCVec_u8Z RoutingFees_write(const struct LDKRoutingFees *NONNULL_PTR obj);
        public static native byte[] RoutingFees_write(long obj);
        // void NodeAnnouncementInfo_free(struct LDKNodeAnnouncementInfo this_ptr);
        public static native void NodeAnnouncementInfo_free(long this_ptr);
-       // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
-       public static native long NodeAnnouncementInfo_clone(long orig);
        // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
        public static native long NodeAnnouncementInfo_get_features(long this_ptr);
        // void NodeAnnouncementInfo_set_features(struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr, struct LDKNodeFeatures val);
@@ -2857,14 +3453,14 @@ public class bindings {
        public static native void NodeAnnouncementInfo_set_announcement_message(long this_ptr, long val);
        // MUST_USE_RES struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_new(struct LDKNodeFeatures features_arg, uint32_t last_update_arg, struct LDKThreeBytes rgb_arg, struct LDKThirtyTwoBytes alias_arg, struct LDKCVec_NetAddressZ addresses_arg, struct LDKNodeAnnouncement announcement_message_arg);
        public static native long NodeAnnouncementInfo_new(long features_arg, int last_update_arg, byte[] rgb_arg, byte[] alias_arg, long[] addresses_arg, long announcement_message_arg);
+       // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
+       public static native long NodeAnnouncementInfo_clone(long orig);
        // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
        public static native byte[] NodeAnnouncementInfo_write(long obj);
        // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ NodeAnnouncementInfo_read(struct LDKu8slice ser);
        public static native long NodeAnnouncementInfo_read(byte[] ser);
        // void NodeInfo_free(struct LDKNodeInfo this_ptr);
        public static native void NodeInfo_free(long this_ptr);
-       // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
-       public static native long NodeInfo_clone(long orig);
        // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
        public static native void NodeInfo_set_channels(long this_ptr, long[] val);
        // struct LDKRoutingFees NodeInfo_get_lowest_inbound_channel_fees(const struct LDKNodeInfo *NONNULL_PTR this_ptr);
@@ -2877,6 +3473,8 @@ public class bindings {
        public static native void NodeInfo_set_announcement_info(long this_ptr, long val);
        // MUST_USE_RES struct LDKNodeInfo NodeInfo_new(struct LDKCVec_u64Z channels_arg, struct LDKRoutingFees lowest_inbound_channel_fees_arg, struct LDKNodeAnnouncementInfo announcement_info_arg);
        public static native long NodeInfo_new(long[] channels_arg, long lowest_inbound_channel_fees_arg, long announcement_info_arg);
+       // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
+       public static native long NodeInfo_clone(long orig);
        // 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);
index f6ba8ed457b83893af5ae4cc558417c428433f47..2771149f08f5f06c7a514d608f773ef5fbc28471 100644 (file)
@@ -14,13 +14,6 @@ public class AcceptChannel extends CommonBase {
                if (ptr != 0) { bindings.AcceptChannel_free(ptr); }
        }
 
-       public AcceptChannel clone() {
-               long ret = bindings.AcceptChannel_clone(this.ptr);
-               AcceptChannel ret_hu_conv = new AcceptChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_temporary_channel_id() {
                byte[] ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
                return ret;
@@ -147,15 +140,21 @@ public class AcceptChannel extends CommonBase {
                bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, val);
        }
 
+       public AcceptChannel clone() {
+               long ret = bindings.AcceptChannel_clone(this.ptr);
+               AcceptChannel ret_hu_conv = new AcceptChannel(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.AcceptChannel_write(this.ptr);
                return ret;
        }
 
-       public static AcceptChannel constructor_read(byte[] ser) {
+       public static Result_AcceptChannelDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.AcceptChannel_read(ser);
-               AcceptChannel ret_hu_conv = new AcceptChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 23de5a0fd25c6f05f7a5485c638a95cfb9cc5a5e..14aba58829362a22a3a5a41531b7aa7c661cad1b 100644 (file)
@@ -14,13 +14,6 @@ public class AnnouncementSignatures extends CommonBase {
                if (ptr != 0) { bindings.AnnouncementSignatures_free(ptr); }
        }
 
-       public AnnouncementSignatures clone() {
-               long ret = bindings.AnnouncementSignatures_clone(this.ptr);
-               AnnouncementSignatures ret_hu_conv = new AnnouncementSignatures(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr);
                return ret;
@@ -64,15 +57,21 @@ public class AnnouncementSignatures extends CommonBase {
                return ret_hu_conv;
        }
 
+       public AnnouncementSignatures clone() {
+               long ret = bindings.AnnouncementSignatures_clone(this.ptr);
+               AnnouncementSignatures ret_hu_conv = new AnnouncementSignatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.AnnouncementSignatures_write(this.ptr);
                return ret;
        }
 
-       public static AnnouncementSignatures constructor_read(byte[] ser) {
+       public static Result_AnnouncementSignaturesDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.AnnouncementSignatures_read(ser);
-               AnnouncementSignatures ret_hu_conv = new AnnouncementSignatures(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 5626c66d8bc185b01d1d52f1aadbfdd6d0b0de15..337469f3ff4d287644f05d08273d17ee703eaa46 100644 (file)
@@ -14,13 +14,6 @@ public class BuiltCommitmentTransaction extends CommonBase {
                if (ptr != 0) { bindings.BuiltCommitmentTransaction_free(ptr); }
        }
 
-       public BuiltCommitmentTransaction clone() {
-               long ret = bindings.BuiltCommitmentTransaction_clone(this.ptr);
-               BuiltCommitmentTransaction ret_hu_conv = new BuiltCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_transaction() {
                byte[] ret = bindings.BuiltCommitmentTransaction_get_transaction(this.ptr);
                return ret;
@@ -46,15 +39,21 @@ public class BuiltCommitmentTransaction extends CommonBase {
                return ret_hu_conv;
        }
 
+       public BuiltCommitmentTransaction clone() {
+               long ret = bindings.BuiltCommitmentTransaction_clone(this.ptr);
+               BuiltCommitmentTransaction ret_hu_conv = new BuiltCommitmentTransaction(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.BuiltCommitmentTransaction_write(this.ptr);
                return ret;
        }
 
-       public static BuiltCommitmentTransaction constructor_read(byte[] ser) {
+       public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.BuiltCommitmentTransaction_read(ser);
-               BuiltCommitmentTransaction ret_hu_conv = new BuiltCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 951ca5df751defe7bff0ff003b265e4605de162e..737433d879b865a94fd01e57a77c184b21b52273 100644 (file)
@@ -15,7 +15,7 @@ public class ChainMonitor extends CommonBase {
        }
 
        public void block_connected(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height) {
-               bindings.ChainMonitor_block_connected(this.ptr, header, Arrays.stream(txdata).mapToLong(arr_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_24.a, arr_conv_24.b)).toArray(), height);
+               bindings.ChainMonitor_block_connected(this.ptr, header, Arrays.stream(txdata).mapToLong(txdata_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_24.a, txdata_conv_24.b)).toArray(), height);
                /* TODO 2 TwoTuple<Long, byte[]>  */;
        }
 
diff --git a/src/main/java/org/ldk/structs/ChainParameters.java b/src/main/java/org/ldk/structs/ChainParameters.java
new file mode 100644 (file)
index 0000000..06e5693
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ChainParameters extends CommonBase {
+       ChainParameters(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.ChainParameters_free(ptr); }
+       }
+
+       public LDKNetwork get_network() {
+               LDKNetwork ret = bindings.ChainParameters_get_network(this.ptr);
+               return ret;
+       }
+
+       public void set_network(LDKNetwork val) {
+               bindings.ChainParameters_set_network(this.ptr, val);
+       }
+
+       public byte[] get_latest_hash() {
+               byte[] ret = bindings.ChainParameters_get_latest_hash(this.ptr);
+               return ret;
+       }
+
+       public void set_latest_hash(byte[] val) {
+               bindings.ChainParameters_set_latest_hash(this.ptr, val);
+       }
+
+       public long get_latest_height() {
+               long ret = bindings.ChainParameters_get_latest_height(this.ptr);
+               return ret;
+       }
+
+       public void set_latest_height(long val) {
+               bindings.ChainParameters_set_latest_height(this.ptr, val);
+       }
+
+       public static ChainParameters constructor_new(LDKNetwork network_arg, byte[] latest_hash_arg, long latest_height_arg) {
+               long ret = bindings.ChainParameters_new(network_arg, latest_hash_arg, latest_height_arg);
+               ChainParameters ret_hu_conv = new ChainParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
index a49a163b771d3c9438d9cdc10577b72a671af637..52c88eacf3ff00b53544db6c94f61a0377b7e348 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelAnnouncement extends CommonBase {
                if (ptr != 0) { bindings.ChannelAnnouncement_free(ptr); }
        }
 
-       public ChannelAnnouncement clone() {
-               long ret = bindings.ChannelAnnouncement_clone(this.ptr);
-               ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_node_signature_1() {
                byte[] ret = bindings.ChannelAnnouncement_get_node_signature_1(this.ptr);
                return ret;
@@ -77,15 +70,21 @@ public class ChannelAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelAnnouncement clone() {
+               long ret = bindings.ChannelAnnouncement_clone(this.ptr);
+               ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelAnnouncement_write(this.ptr);
                return ret;
        }
 
-       public static ChannelAnnouncement constructor_read(byte[] ser) {
+       public static Result_ChannelAnnouncementDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelAnnouncement_read(ser);
-               ChannelAnnouncement ret_hu_conv = new ChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 869ca5729206060e56fd713f8e8c066375d9492e..5af68d383c2fefab17e063aa3d816a4202eacb99 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelConfig extends CommonBase {
                if (ptr != 0) { bindings.ChannelConfig_free(ptr); }
        }
 
-       public ChannelConfig clone() {
-               long ret = bindings.ChannelConfig_clone(this.ptr);
-               ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public int get_fee_proportional_millionths() {
                int ret = bindings.ChannelConfig_get_fee_proportional_millionths(this.ptr);
                return ret;
@@ -55,6 +48,13 @@ public class ChannelConfig extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelConfig clone() {
+               long ret = bindings.ChannelConfig_clone(this.ptr);
+               ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelConfig constructor_default() {
                long ret = bindings.ChannelConfig_default();
                ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
@@ -67,10 +67,9 @@ public class ChannelConfig extends CommonBase {
                return ret;
        }
 
-       public static ChannelConfig constructor_read(byte[] ser) {
+       public static Result_ChannelConfigDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelConfig_read(ser);
-               ChannelConfig ret_hu_conv = new ChannelConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 4c690d2d67f876adfcb4af2dc113a5c3932fe343..216c017bdb1b602df4b3378ff372f643452b94db 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelDetails extends CommonBase {
                if (ptr != 0) { bindings.ChannelDetails_free(ptr); }
        }
 
-       public ChannelDetails clone() {
-               long ret = bindings.ChannelDetails_clone(this.ptr);
-               ChannelDetails ret_hu_conv = new ChannelDetails(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.ChannelDetails_get_channel_id(this.ptr);
                return ret;
@@ -49,14 +42,6 @@ public class ChannelDetails extends CommonBase {
        public void set_counterparty_features(InitFeatures val) {
                bindings.ChannelDetails_set_counterparty_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public long get_channel_value_satoshis() {
@@ -104,4 +89,11 @@ public class ChannelDetails extends CommonBase {
                bindings.ChannelDetails_set_is_live(this.ptr, val);
        }
 
+       public ChannelDetails clone() {
+               long ret = bindings.ChannelDetails_clone(this.ptr);
+               ChannelDetails ret_hu_conv = new ChannelDetails(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 428ed8b7d8733fb30107a1aba6bb402255da3669..7b10e51bf73b03276b062101feda6a0961b21841 100644 (file)
@@ -14,4 +14,36 @@ public class ChannelFeatures extends CommonBase {
                if (ptr != 0) { bindings.ChannelFeatures_free(ptr); }
        }
 
+       public ChannelFeatures clone() {
+               long ret = bindings.ChannelFeatures_clone(this.ptr);
+               ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static ChannelFeatures constructor_empty() {
+               long ret = bindings.ChannelFeatures_empty();
+               ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static ChannelFeatures constructor_known() {
+               long ret = bindings.ChannelFeatures_known();
+               ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public byte[] write() {
+               byte[] ret = bindings.ChannelFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_ChannelFeaturesDecodeErrorZ constructor_read(byte[] ser) {
+               long ret = bindings.ChannelFeatures_read(ser);
+               Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index a07f2e2afb86bc0b03c45905f1bd22c5800e1db8..730d50adb2618cd4932ad8ab51c166fa574003d1 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelHandshakeConfig extends CommonBase {
                if (ptr != 0) { bindings.ChannelHandshakeConfig_free(ptr); }
        }
 
-       public ChannelHandshakeConfig clone() {
-               long ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
-               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public int get_minimum_depth() {
                int ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this.ptr);
                return ret;
@@ -55,6 +48,13 @@ public class ChannelHandshakeConfig extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelHandshakeConfig clone() {
+               long ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
+               ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelHandshakeConfig constructor_default() {
                long ret = bindings.ChannelHandshakeConfig_default();
                ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
index e108446ee1f65d1a21dd944eccbd76ecff617398..33eec3053dfbd03871304c071cab459fe50dd6ae 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelHandshakeLimits extends CommonBase {
                if (ptr != 0) { bindings.ChannelHandshakeLimits_free(ptr); }
        }
 
-       public ChannelHandshakeLimits clone() {
-               long ret = bindings.ChannelHandshakeLimits_clone(this.ptr);
-               ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public long get_min_funding_satoshis() {
                long ret = bindings.ChannelHandshakeLimits_get_min_funding_satoshis(this.ptr);
                return ret;
@@ -118,6 +111,13 @@ public class ChannelHandshakeLimits extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelHandshakeLimits clone() {
+               long ret = bindings.ChannelHandshakeLimits_clone(this.ptr);
+               ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelHandshakeLimits constructor_default() {
                long ret = bindings.ChannelHandshakeLimits_default();
                ChannelHandshakeLimits ret_hu_conv = new ChannelHandshakeLimits(null, ret);
index 8c9e5727d8c2ad96cd5f4460cee79dd8f6831c9b..90f1f4b7bd8ff9599fe6a17a87a5ce457303b25c 100644 (file)
@@ -24,14 +24,6 @@ public class ChannelInfo extends CommonBase {
        public void set_features(ChannelFeatures val) {
                bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public byte[] get_node_one() {
@@ -88,15 +80,21 @@ public class ChannelInfo extends CommonBase {
                this.ptrs_to.add(val);
        }
 
+       public ChannelInfo clone() {
+               long ret = bindings.ChannelInfo_clone(this.ptr);
+               ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelInfo_write(this.ptr);
                return ret;
        }
 
-       public static ChannelInfo constructor_read(byte[] ser) {
+       public static Result_ChannelInfoDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelInfo_read(ser);
-               ChannelInfo ret_hu_conv = new ChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
diff --git a/src/main/java/org/ldk/structs/ChannelKeys.java b/src/main/java/org/ldk/structs/ChannelKeys.java
deleted file mode 100644 (file)
index 500e693..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class ChannelKeys extends CommonBase {
-       final bindings.LDKChannelKeys bindings_instance;
-       ChannelKeys(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
-       private ChannelKeys(bindings.LDKChannelKeys arg, ChannelPublicKeys pubkeys) {
-               super(bindings.LDKChannelKeys_new(arg, pubkeys == null ? 0 : pubkeys.ptr & ~1));
-               this.ptrs_to.add(arg);
-               this.ptrs_to.add(pubkeys);
-               this.bindings_instance = arg;
-       }
-       @Override @SuppressWarnings("deprecation")
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.ChannelKeys_free(ptr); } super.finalize();
-       }
-
-       public static interface ChannelKeysInterface {
-               byte[] get_per_commitment_point(long idx);
-               byte[] release_commitment_secret(long idx);
-               TwoTuple<Long, Long> key_derivation_params();
-               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment(CommitmentTransaction commitment_tx);
-               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs(HolderCommitmentTransaction commitment_tx);
-               Result_SignatureNoneZ sign_justice_transaction(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc);
-               Result_SignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, HTLCOutputInCommitment htlc);
-               Result_SignatureNoneZ sign_closing_transaction(byte[] closing_tx);
-               Result_SignatureNoneZ sign_channel_announcement(UnsignedChannelAnnouncement msg);
-               void ready_channel(ChannelTransactionParameters channel_parameters);
-               byte[] write();
-       }
-       private static class LDKChannelKeysHolder { ChannelKeys held; }
-       public static ChannelKeys new_impl(ChannelKeysInterface arg, ChannelPublicKeys pubkeys) {
-               final LDKChannelKeysHolder impl_holder = new LDKChannelKeysHolder();
-               impl_holder.held = new ChannelKeys(new bindings.LDKChannelKeys() {
-                       @Override public byte[] get_per_commitment_point(long idx) {
-                               byte[] ret = arg.get_per_commitment_point(idx);
-                               return ret;
-                       }
-                       @Override public byte[] release_commitment_secret(long idx) {
-                               byte[] ret = arg.release_commitment_secret(idx);
-                               return ret;
-                       }
-                       @Override public long key_derivation_params() {
-                               TwoTuple<Long, Long> ret = arg.key_derivation_params();
-                               long result = bindings.C2Tuple_u64u64Z_new(ret.a, ret.b);
-                               return result;
-                       }
-                       @Override public long sign_counterparty_commitment(long commitment_tx) {
-                               CommitmentTransaction commitment_tx_hu_conv = new CommitmentTransaction(null, commitment_tx);
-                               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = arg.sign_counterparty_commitment(commitment_tx_hu_conv);
-                               long result = ret != null ? ret.ptr : 0;
-                               return result;
-                       }
-                       @Override public long sign_holder_commitment_and_htlcs(long commitment_tx) {
-                               HolderCommitmentTransaction commitment_tx_hu_conv = new HolderCommitmentTransaction(null, commitment_tx);
-                               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = arg.sign_holder_commitment_and_htlcs(commitment_tx_hu_conv);
-                               long result = ret != null ? ret.ptr : 0;
-                               return result;
-                       }
-                       @Override public long sign_justice_transaction(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc) {
-                               HTLCOutputInCommitment htlc_hu_conv = new HTLCOutputInCommitment(null, htlc);
-                               Result_SignatureNoneZ ret = arg.sign_justice_transaction(justice_tx, input, amount, per_commitment_key, htlc_hu_conv);
-                               long result = ret != null ? ret.ptr : 0;
-                               return result;
-                       }
-                       @Override public long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc) {
-                               HTLCOutputInCommitment htlc_hu_conv = new HTLCOutputInCommitment(null, htlc);
-                               Result_SignatureNoneZ ret = arg.sign_counterparty_htlc_transaction(htlc_tx, input, amount, per_commitment_point, htlc_hu_conv);
-                               long result = ret != null ? ret.ptr : 0;
-                               return result;
-                       }
-                       @Override public long sign_closing_transaction(byte[] closing_tx) {
-                               Result_SignatureNoneZ ret = arg.sign_closing_transaction(closing_tx);
-                               long result = ret != null ? ret.ptr : 0;
-                               return result;
-                       }
-                       @Override public long sign_channel_announcement(long msg) {
-                               UnsignedChannelAnnouncement msg_hu_conv = new UnsignedChannelAnnouncement(null, msg);
-                               Result_SignatureNoneZ ret = arg.sign_channel_announcement(msg_hu_conv);
-                               long result = ret != null ? ret.ptr : 0;
-                               return result;
-                       }
-                       @Override public void ready_channel(long channel_parameters) {
-                               ChannelTransactionParameters channel_parameters_hu_conv = new ChannelTransactionParameters(null, channel_parameters);
-                               arg.ready_channel(channel_parameters_hu_conv);
-                       }
-                       @Override public byte[] write() {
-                               byte[] ret = arg.write();
-                               return ret;
-                       }
-               }, pubkeys);
-               return impl_holder.held;
-       }
-       public byte[] get_per_commitment_point(long idx) {
-               byte[] ret = bindings.ChannelKeys_get_per_commitment_point(this.ptr, idx);
-               return ret;
-       }
-
-       public byte[] release_commitment_secret(long idx) {
-               byte[] ret = bindings.ChannelKeys_release_commitment_secret(this.ptr, idx);
-               return ret;
-       }
-
-       public TwoTuple<Long, Long> key_derivation_params() {
-               long ret = bindings.ChannelKeys_key_derivation_params(this.ptr);
-               long ret_a = bindings.LDKC2Tuple_u64u64Z_get_a(ret);
-               long ret_b = bindings.LDKC2Tuple_u64u64Z_get_b(ret);
-               TwoTuple<Long, Long> ret_conv = new TwoTuple<Long, Long>(ret_a, ret_b, () -> {
-                       bindings.C2Tuple_u64u64Z_free(ret);
-               });
-               return ret_conv;
-       }
-
-       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment(CommitmentTransaction commitment_tx) {
-               long ret = bindings.ChannelKeys_sign_counterparty_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr & ~1);
-               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(commitment_tx);
-               return ret_hu_conv;
-       }
-
-       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs(HolderCommitmentTransaction commitment_tx) {
-               long ret = bindings.ChannelKeys_sign_holder_commitment_and_htlcs(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr & ~1);
-               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(commitment_tx);
-               return ret_hu_conv;
-       }
-
-       public Result_SignatureNoneZ sign_justice_transaction(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc) {
-               long ret = bindings.ChannelKeys_sign_justice_transaction(this.ptr, justice_tx, input, amount, per_commitment_key, htlc == null ? 0 : htlc.ptr & ~1);
-               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(htlc);
-               return ret_hu_conv;
-       }
-
-       public Result_SignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, HTLCOutputInCommitment htlc) {
-               long ret = bindings.ChannelKeys_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, per_commitment_point, htlc == null ? 0 : htlc.ptr & ~1);
-               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(htlc);
-               return ret_hu_conv;
-       }
-
-       public Result_SignatureNoneZ sign_closing_transaction(byte[] closing_tx) {
-               long ret = bindings.ChannelKeys_sign_closing_transaction(this.ptr, closing_tx);
-               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
-       public Result_SignatureNoneZ sign_channel_announcement(UnsignedChannelAnnouncement msg) {
-               long ret = bindings.ChannelKeys_sign_channel_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1);
-               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(msg);
-               return ret_hu_conv;
-       }
-
-       public void ready_channel(ChannelTransactionParameters channel_parameters) {
-               bindings.ChannelKeys_ready_channel(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr & ~1);
-               this.ptrs_to.add(channel_parameters);
-       }
-
-       public byte[] write() {
-               byte[] ret = bindings.ChannelKeys_write(this.ptr);
-               return ret;
-       }
-
-       public ChannelPublicKeys get_pubkeys() {
-               long ret = bindings.ChannelKeys_get_pubkeys(this.ptr);
-               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public ChannelKeys clone() {
-               long ret = bindings.ChannelKeys_clone(this.ptr);
-               ChannelKeys ret_hu_conv = new ChannelKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-}
index b89636f69541e399beb5e4b3078e0f7e6b77da80..4878056820d2e08f2ad72dcd374cd2b7461e65e7 100644 (file)
@@ -14,8 +14,8 @@ public class ChannelManager extends CommonBase {
                if (ptr != 0) { bindings.ChannelManager_free(ptr); }
        }
 
-       public static ChannelManager constructor_new(LDKNetwork network, FeeEstimator fee_est, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, KeysInterface keys_manager, UserConfig config, long current_blockchain_height) {
-               long ret = bindings.ChannelManager_new(network, fee_est == null ? 0 : fee_est.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, keys_manager == null ? 0 : keys_manager.ptr, config == null ? 0 : config.ptr & ~1, current_blockchain_height);
+       public static ChannelManager constructor_new(FeeEstimator fee_est, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, KeysInterface keys_manager, UserConfig config, LDKNetwork params_network_arg, byte[] params_latest_hash_arg, long params_latest_height_arg) {
+               long ret = bindings.ChannelManager_new(fee_est == null ? 0 : fee_est.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, keys_manager == null ? 0 : keys_manager.ptr, config == null ? 0 : config.ptr & ~1, bindings.ChainParameters_new(params_network_arg, params_latest_hash_arg, params_latest_height_arg));
                ChannelManager ret_hu_conv = new ChannelManager(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(fee_est);
@@ -36,26 +36,26 @@ public class ChannelManager extends CommonBase {
 
        public ChannelDetails[] list_channels() {
                long[] ret = bindings.ChannelManager_list_channels(this.ptr);
-               ChannelDetails[] arr_conv_16_arr = new ChannelDetails[ret.length];
+               ChannelDetails[] ret_conv_16_arr = new ChannelDetails[ret.length];
                for (int q = 0; q < ret.length; q++) {
-                       long arr_conv_16 = ret[q];
-                       ChannelDetails arr_conv_16_hu_conv = new ChannelDetails(null, arr_conv_16);
-                       arr_conv_16_hu_conv.ptrs_to.add(this);
-                       arr_conv_16_arr[q] = arr_conv_16_hu_conv;
+                       long ret_conv_16 = ret[q];
+                       ChannelDetails ret_conv_16_hu_conv = new ChannelDetails(null, ret_conv_16);
+                       ret_conv_16_hu_conv.ptrs_to.add(this);
+                       ret_conv_16_arr[q] = ret_conv_16_hu_conv;
                }
-               return arr_conv_16_arr;
+               return ret_conv_16_arr;
        }
 
        public ChannelDetails[] list_usable_channels() {
                long[] ret = bindings.ChannelManager_list_usable_channels(this.ptr);
-               ChannelDetails[] arr_conv_16_arr = new ChannelDetails[ret.length];
+               ChannelDetails[] ret_conv_16_arr = new ChannelDetails[ret.length];
                for (int q = 0; q < ret.length; q++) {
-                       long arr_conv_16 = ret[q];
-                       ChannelDetails arr_conv_16_hu_conv = new ChannelDetails(null, arr_conv_16);
-                       arr_conv_16_hu_conv.ptrs_to.add(this);
-                       arr_conv_16_arr[q] = arr_conv_16_hu_conv;
+                       long ret_conv_16 = ret[q];
+                       ChannelDetails ret_conv_16_hu_conv = new ChannelDetails(null, ret_conv_16);
+                       ret_conv_16_hu_conv.ptrs_to.add(this);
+                       ret_conv_16_arr[q] = ret_conv_16_hu_conv;
                }
-               return arr_conv_16_arr;
+               return ret_conv_16_arr;
        }
 
        public Result_NoneAPIErrorZ close_channel(byte[] channel_id) {
@@ -87,7 +87,7 @@ public class ChannelManager extends CommonBase {
        }
 
        public void broadcast_node_announcement(byte[] rgb, byte[] alias, NetAddress[] addresses) {
-               bindings.ChannelManager_broadcast_node_announcement(this.ptr, rgb, alias, Arrays.stream(addresses).mapToLong(arr_conv_12 -> arr_conv_12.ptr).toArray());
+               bindings.ChannelManager_broadcast_node_announcement(this.ptr, rgb, alias, Arrays.stream(addresses).mapToLong(addresses_conv_12 -> addresses_conv_12.ptr).toArray());
                /* TODO 2 NetAddress  */;
        }
 
@@ -133,8 +133,15 @@ public class ChannelManager extends CommonBase {
                return ret_hu_conv;
        }
 
+       public Listen as_Listen() {
+               long ret = bindings.ChannelManager_as_Listen(this.ptr);
+               Listen ret_hu_conv = new Listen(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public void block_connected(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height) {
-               bindings.ChannelManager_block_connected(this.ptr, header, Arrays.stream(txdata).mapToLong(arr_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_24.a, arr_conv_24.b)).toArray(), height);
+               bindings.ChannelManager_block_connected(this.ptr, header, Arrays.stream(txdata).mapToLong(txdata_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_24.a, txdata_conv_24.b)).toArray(), height);
                /* TODO 2 TwoTuple<Long, byte[]>  */;
        }
 
@@ -142,6 +149,10 @@ public class ChannelManager extends CommonBase {
                bindings.ChannelManager_block_disconnected(this.ptr, header);
        }
 
+       public void await_persistable_update() {
+               bindings.ChannelManager_await_persistable_update(this.ptr);
+       }
+
        public ChannelMessageHandler as_ChannelMessageHandler() {
                long ret = bindings.ChannelManager_as_ChannelMessageHandler(this.ptr);
                ChannelMessageHandler ret_hu_conv = new ChannelMessageHandler(null, ret);
index 96b198da425191f94beca178698a712b2b670ecf..5653e5d4c58c277e099f7bc31acde923ece6a48e 100644 (file)
@@ -87,7 +87,7 @@ public class ChannelManagerReadArgs extends CommonBase {
        }
 
        public static ChannelManagerReadArgs constructor_new(KeysInterface keys_manager, FeeEstimator fee_estimator, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, UserConfig default_config, ChannelMonitor[] channel_monitors) {
-               long ret = bindings.ChannelManagerReadArgs_new(keys_manager == null ? 0 : keys_manager.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, default_config == null ? 0 : default_config.ptr & ~1, Arrays.stream(channel_monitors).mapToLong(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray());
+               long ret = bindings.ChannelManagerReadArgs_new(keys_manager == null ? 0 : keys_manager.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, default_config == null ? 0 : default_config.ptr & ~1, Arrays.stream(channel_monitors).mapToLong(channel_monitors_conv_16 -> channel_monitors_conv_16 == null ? 0 : channel_monitors_conv_16.ptr & ~1).toArray());
                ChannelManagerReadArgs ret_hu_conv = new ChannelManagerReadArgs(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(keys_manager);
index 060133855ae1117c56add57e5cf0a659e0bf9cdf..2b9aebe4680264b50744ed174afee298448ee6a4 100644 (file)
@@ -26,7 +26,7 @@ public class ChannelMessageHandler extends CommonBase {
                void handle_funding_created(byte[] their_node_id, FundingCreated msg);
                void handle_funding_signed(byte[] their_node_id, FundingSigned msg);
                void handle_funding_locked(byte[] their_node_id, FundingLocked msg);
-               void handle_shutdown(byte[] their_node_id, Shutdown msg);
+               void handle_shutdown(byte[] their_node_id, InitFeatures their_features, Shutdown msg);
                void handle_closing_signed(byte[] their_node_id, ClosingSigned msg);
                void handle_update_add_htlc(byte[] their_node_id, UpdateAddHTLC msg);
                void handle_update_fulfill_htlc(byte[] their_node_id, UpdateFulfillHTLC msg);
@@ -69,9 +69,10 @@ public class ChannelMessageHandler extends CommonBase {
                                FundingLocked msg_hu_conv = new FundingLocked(null, msg);
                                arg.handle_funding_locked(their_node_id, msg_hu_conv);
                        }
-                       @Override public void handle_shutdown(byte[] their_node_id, long msg) {
+                       @Override public void handle_shutdown(byte[] their_node_id, long their_features, long msg) {
+                               InitFeatures their_features_hu_conv = new InitFeatures(null, their_features);
                                Shutdown msg_hu_conv = new Shutdown(null, msg);
-                               arg.handle_shutdown(their_node_id, msg_hu_conv);
+                               arg.handle_shutdown(their_node_id, their_features_hu_conv, msg_hu_conv);
                        }
                        @Override public void handle_closing_signed(byte[] their_node_id, long msg) {
                                ClosingSigned msg_hu_conv = new ClosingSigned(null, msg);
@@ -130,28 +131,12 @@ public class ChannelMessageHandler extends CommonBase {
        public void handle_open_channel(byte[] their_node_id, InitFeatures their_features, OpenChannel msg) {
                bindings.ChannelMessageHandler_handle_open_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(their_features);
-               // 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, their_features is reset to null and is now a dummy object.
-               their_features.ptr = 0;
                this.ptrs_to.add(msg);
        }
 
        public void handle_accept_channel(byte[] their_node_id, InitFeatures their_features, AcceptChannel msg) {
                bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(their_features);
-               // 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, their_features is reset to null and is now a dummy object.
-               their_features.ptr = 0;
                this.ptrs_to.add(msg);
        }
 
@@ -170,8 +155,9 @@ public class ChannelMessageHandler extends CommonBase {
                this.ptrs_to.add(msg);
        }
 
-       public void handle_shutdown(byte[] their_node_id, Shutdown msg) {
-               bindings.ChannelMessageHandler_handle_shutdown(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
+       public void handle_shutdown(byte[] their_node_id, InitFeatures their_features, Shutdown msg) {
+               bindings.ChannelMessageHandler_handle_shutdown(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
+               this.ptrs_to.add(their_features);
                this.ptrs_to.add(msg);
        }
 
index e19dfe42da49b7c4a159cc7807070f0aca1596b3..84f7f4e8d2aff6a744272bbf605a06fe9c3bea6d 100644 (file)
@@ -56,26 +56,26 @@ public class ChannelMonitor extends CommonBase {
 
        public MonitorEvent[] get_and_clear_pending_monitor_events() {
                long[] ret = bindings.ChannelMonitor_get_and_clear_pending_monitor_events(this.ptr);
-               MonitorEvent[] arr_conv_14_arr = new MonitorEvent[ret.length];
+               MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret.length];
                for (int o = 0; o < ret.length; o++) {
-                       long arr_conv_14 = ret[o];
-                       MonitorEvent arr_conv_14_hu_conv = new MonitorEvent(null, arr_conv_14);
-                       arr_conv_14_hu_conv.ptrs_to.add(this);
-                       arr_conv_14_arr[o] = arr_conv_14_hu_conv;
+                       long ret_conv_14 = ret[o];
+                       MonitorEvent ret_conv_14_hu_conv = MonitorEvent.constr_from_ptr(ret_conv_14);
+                       ret_conv_14_hu_conv.ptrs_to.add(this);
+                       ret_conv_14_arr[o] = ret_conv_14_hu_conv;
                }
-               return arr_conv_14_arr;
+               return ret_conv_14_arr;
        }
 
        public Event[] get_and_clear_pending_events() {
                long[] ret = bindings.ChannelMonitor_get_and_clear_pending_events(this.ptr);
-               Event[] arr_conv_7_arr = new Event[ret.length];
+               Event[] ret_conv_7_arr = new Event[ret.length];
                for (int h = 0; h < ret.length; h++) {
-                       long arr_conv_7 = ret[h];
-                       Event arr_conv_7_hu_conv = Event.constr_from_ptr(arr_conv_7);
-                       arr_conv_7_hu_conv.ptrs_to.add(this);
-                       arr_conv_7_arr[h] = arr_conv_7_hu_conv;
+                       long ret_conv_7 = ret[h];
+                       Event ret_conv_7_hu_conv = Event.constr_from_ptr(ret_conv_7);
+                       ret_conv_7_hu_conv.ptrs_to.add(this);
+                       ret_conv_7_arr[h] = ret_conv_7_hu_conv;
                }
-               return arr_conv_7_arr;
+               return ret_conv_7_arr;
        }
 
        public byte[][] get_latest_holder_commitment_txn(Logger logger) {
@@ -85,33 +85,33 @@ public class ChannelMonitor extends CommonBase {
        }
 
        public TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] block_connected(byte[] header, TwoTuple<Long, byte[]>[] txdata, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
-               long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, Arrays.stream(txdata).mapToLong(arr_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_24.a, arr_conv_24.b)).toArray(), height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
-               TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] arr_conv_46_arr = new TwoTuple[ret.length];
+               long[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, Arrays.stream(txdata).mapToLong(txdata_conv_24 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_24.a, txdata_conv_24.b)).toArray(), height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+               TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>[] ret_conv_46_arr = new TwoTuple[ret.length];
                for (int u = 0; u < ret.length; u++) {
-                       long arr_conv_46 = ret[u];
-                       byte[] arr_conv_46_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(arr_conv_46);
-                       long[] arr_conv_46_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(arr_conv_46);
-                       TwoTuple<Integer, TxOut>[] arr_conv_26_arr = new TwoTuple[arr_conv_46_b.length];
-                       for (int a = 0; a < arr_conv_46_b.length; a++) {
-                               long arr_conv_26 = arr_conv_46_b[a];
-                               int arr_conv_26_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(arr_conv_26);
-                               long arr_conv_26_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(arr_conv_26));
-                               TxOut arr_conv_26_b_conv = new TxOut(null, arr_conv_26_b);;
-                               TwoTuple<Integer, TxOut> arr_conv_26_conv = new TwoTuple<Integer, TxOut>(arr_conv_26_a, arr_conv_26_b_conv, () -> {
-                                       bindings.C2Tuple_u32TxOutZ_free(arr_conv_26);
+                       long ret_conv_46 = ret[u];
+                       byte[] ret_conv_46_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_46);
+                       long[] ret_conv_46_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_46);
+                       TwoTuple<Integer, TxOut>[] ret_conv_46_b_conv_26_arr = new TwoTuple[ret_conv_46_b.length];
+                       for (int a = 0; a < ret_conv_46_b.length; a++) {
+                               long ret_conv_46_b_conv_26 = ret_conv_46_b[a];
+                               int ret_conv_46_b_conv_26_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_46_b_conv_26);
+                               long ret_conv_46_b_conv_26_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_46_b_conv_26));
+                               TxOut ret_conv_46_b_conv_26_b_conv = new TxOut(null, ret_conv_46_b_conv_26_b);;
+                               TwoTuple<Integer, TxOut> ret_conv_46_b_conv_26_conv = new TwoTuple<Integer, TxOut>(ret_conv_46_b_conv_26_a, ret_conv_46_b_conv_26_b_conv, () -> {
+                                       bindings.C2Tuple_u32TxOutZ_free(ret_conv_46_b_conv_26);
                                });
-                               arr_conv_26_b_conv.ptrs_to.add(arr_conv_26_conv);
-                               arr_conv_26_arr[a] = arr_conv_26_conv;
+                               ret_conv_46_b_conv_26_b_conv.ptrs_to.add(ret_conv_46_b_conv_26_conv);
+                               ret_conv_46_b_conv_26_arr[a] = ret_conv_46_b_conv_26_conv;
                        };
-                       TwoTuple<byte[], TwoTuple<Integer, TxOut>[]> arr_conv_46_conv = new TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>(arr_conv_46_a, arr_conv_26_arr);
+                       TwoTuple<byte[], TwoTuple<Integer, TxOut>[]> ret_conv_46_conv = new TwoTuple<byte[], TwoTuple<Integer, TxOut>[]>(ret_conv_46_a, ret_conv_46_b_conv_26_arr);
                        // Warning: We may not free the C tuple object!
-                       arr_conv_46_arr[u] = arr_conv_46_conv;
+                       ret_conv_46_arr[u] = ret_conv_46_conv;
                }
                /* TODO 2 TwoTuple<Long, byte[]>  */;
                this.ptrs_to.add(broadcaster);
                this.ptrs_to.add(fee_estimator);
                this.ptrs_to.add(logger);
-               return arr_conv_46_arr;
+               return ret_conv_46_arr;
        }
 
        public void block_disconnected(byte[] header, int height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
index 739965b177dca5cac3c32d3545e167f36d1ac9d4..179a200d9824857ac849d8120f246426c65e29ca 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelMonitorUpdate extends CommonBase {
                if (ptr != 0) { bindings.ChannelMonitorUpdate_free(ptr); }
        }
 
-       public ChannelMonitorUpdate clone() {
-               long ret = bindings.ChannelMonitorUpdate_clone(this.ptr);
-               ChannelMonitorUpdate ret_hu_conv = new ChannelMonitorUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public long get_update_id() {
                long ret = bindings.ChannelMonitorUpdate_get_update_id(this.ptr);
                return ret;
@@ -30,6 +23,13 @@ public class ChannelMonitorUpdate extends CommonBase {
                bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val);
        }
 
+       public ChannelMonitorUpdate clone() {
+               long ret = bindings.ChannelMonitorUpdate_clone(this.ptr);
+               ChannelMonitorUpdate ret_hu_conv = new ChannelMonitorUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelMonitorUpdate_write(this.ptr);
                return ret;
index 91102b530ff675b21015619526fad8b5b4af462b..0d2664a6d46f16bcd4d201b082b3cdc0583da16f 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelPublicKeys extends CommonBase {
                if (ptr != 0) { bindings.ChannelPublicKeys_free(ptr); }
        }
 
-       public ChannelPublicKeys clone() {
-               long ret = bindings.ChannelPublicKeys_clone(this.ptr);
-               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_funding_pubkey() {
                byte[] ret = bindings.ChannelPublicKeys_get_funding_pubkey(this.ptr);
                return ret;
@@ -73,15 +66,21 @@ public class ChannelPublicKeys extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelPublicKeys clone() {
+               long ret = bindings.ChannelPublicKeys_clone(this.ptr);
+               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelPublicKeys_write(this.ptr);
                return ret;
        }
 
-       public static ChannelPublicKeys constructor_read(byte[] ser) {
+       public static Result_ChannelPublicKeysDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelPublicKeys_read(ser);
-               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 9df4872905c1fa8da029b53524f79e22149b8948..be92848979f01fec03e5fdc823ed89346133279b 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelReestablish extends CommonBase {
                if (ptr != 0) { bindings.ChannelReestablish_free(ptr); }
        }
 
-       public ChannelReestablish clone() {
-               long ret = bindings.ChannelReestablish_clone(this.ptr);
-               ChannelReestablish ret_hu_conv = new ChannelReestablish(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.ChannelReestablish_get_channel_id(this.ptr);
                return ret;
@@ -48,6 +41,13 @@ public class ChannelReestablish extends CommonBase {
                bindings.ChannelReestablish_set_next_remote_commitment_number(this.ptr, val);
        }
 
+       public ChannelReestablish clone() {
+               long ret = bindings.ChannelReestablish_clone(this.ptr);
+               ChannelReestablish ret_hu_conv = new ChannelReestablish(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelReestablish_write(this.ptr);
                return ret;
index 1740e54c3b8107bbc3e8684f5a2350e0ff86259d..a64af1735bba87cdeb038d5612cf647bb3130c93 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelTransactionParameters extends CommonBase {
                if (ptr != 0) { bindings.ChannelTransactionParameters_free(ptr); }
        }
 
-       public ChannelTransactionParameters clone() {
-               long ret = bindings.ChannelTransactionParameters_clone(this.ptr);
-               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelPublicKeys get_holder_pubkeys() {
                long ret = bindings.ChannelTransactionParameters_get_holder_pubkeys(this.ptr);
                ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
@@ -85,6 +78,13 @@ public class ChannelTransactionParameters extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelTransactionParameters clone() {
+               long ret = bindings.ChannelTransactionParameters_clone(this.ptr);
+               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public boolean is_populated() {
                boolean ret = bindings.ChannelTransactionParameters_is_populated(this.ptr);
                return ret;
@@ -109,10 +109,9 @@ public class ChannelTransactionParameters extends CommonBase {
                return ret;
        }
 
-       public static ChannelTransactionParameters constructor_read(byte[] ser) {
+       public static Result_ChannelTransactionParametersDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelTransactionParameters_read(ser);
-               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index cb055f37c92018fa3283968b387c825753672d70..805b4511cbbbc7fdfa3475bb2f6323c08395d8a0 100644 (file)
@@ -14,13 +14,6 @@ public class ChannelUpdate extends CommonBase {
                if (ptr != 0) { bindings.ChannelUpdate_free(ptr); }
        }
 
-       public ChannelUpdate clone() {
-               long ret = bindings.ChannelUpdate_clone(this.ptr);
-               ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_signature() {
                byte[] ret = bindings.ChannelUpdate_get_signature(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ public class ChannelUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ChannelUpdate clone() {
+               long ret = bindings.ChannelUpdate_clone(this.ptr);
+               ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ChannelUpdate_write(this.ptr);
                return ret;
        }
 
-       public static ChannelUpdate constructor_read(byte[] ser) {
+       public static Result_ChannelUpdateDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ChannelUpdate_read(ser);
-               ChannelUpdate ret_hu_conv = new ChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index fbd0f3305b89641e5d924e8751447739427fff36..a42c3e506fc0e64f1052ef88559b0aab01aba51d 100644 (file)
@@ -14,13 +14,6 @@ public class ClosingSigned extends CommonBase {
                if (ptr != 0) { bindings.ClosingSigned_free(ptr); }
        }
 
-       public ClosingSigned clone() {
-               long ret = bindings.ClosingSigned_clone(this.ptr);
-               ClosingSigned ret_hu_conv = new ClosingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.ClosingSigned_get_channel_id(this.ptr);
                return ret;
@@ -55,15 +48,21 @@ public class ClosingSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ClosingSigned clone() {
+               long ret = bindings.ClosingSigned_clone(this.ptr);
+               ClosingSigned ret_hu_conv = new ClosingSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ClosingSigned_write(this.ptr);
                return ret;
        }
 
-       public static ClosingSigned constructor_read(byte[] ser) {
+       public static Result_ClosingSignedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ClosingSigned_read(ser);
-               ClosingSigned ret_hu_conv = new ClosingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index e6a76bcf4f779fb732e07f2dad2ca96337153aba..b14e1ca416d28204e5dfd9ba858120bc07850ff0 100644 (file)
@@ -14,13 +14,6 @@ public class CommitmentSigned extends CommonBase {
                if (ptr != 0) { bindings.CommitmentSigned_free(ptr); }
        }
 
-       public CommitmentSigned clone() {
-               long ret = bindings.CommitmentSigned_clone(this.ptr);
-               CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ public class CommitmentSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       public CommitmentSigned clone() {
+               long ret = bindings.CommitmentSigned_clone(this.ptr);
+               CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.CommitmentSigned_write(this.ptr);
                return ret;
        }
 
-       public static CommitmentSigned constructor_read(byte[] ser) {
+       public static Result_CommitmentSignedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.CommitmentSigned_read(ser);
-               CommitmentSigned ret_hu_conv = new CommitmentSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index bb38be53660229ac2a186bf5a361c5e0a57a0ccb..a4f1698cf063a79d7693c20baf7fe30d4ef4cc68 100644 (file)
@@ -26,10 +26,9 @@ public class CommitmentTransaction extends CommonBase {
                return ret;
        }
 
-       public static CommitmentTransaction constructor_read(byte[] ser) {
+       public static Result_CommitmentTransactionDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.CommitmentTransaction_read(ser);
-               CommitmentTransaction ret_hu_conv = new CommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index c53eb4ebf3dcd2c29cf02de588287fded7058dd1..b6c5d482f4a9f477204624d91cc2919e10e99f40 100644 (file)
@@ -14,30 +14,23 @@ public class CommitmentUpdate extends CommonBase {
                if (ptr != 0) { bindings.CommitmentUpdate_free(ptr); }
        }
 
-       public CommitmentUpdate clone() {
-               long ret = bindings.CommitmentUpdate_clone(this.ptr);
-               CommitmentUpdate ret_hu_conv = new CommitmentUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_update_add_htlcs(UpdateAddHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, Arrays.stream(val).mapToLong(arr_conv_15 -> arr_conv_15 == null ? 0 : arr_conv_15.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, Arrays.stream(val).mapToLong(val_conv_15 -> val_conv_15 == null ? 0 : val_conv_15.ptr & ~1).toArray());
                /* TODO 2 UpdateAddHTLC  */;
        }
 
        public void set_update_fulfill_htlcs(UpdateFulfillHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, Arrays.stream(val).mapToLong(arr_conv_19 -> arr_conv_19 == null ? 0 : arr_conv_19.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, Arrays.stream(val).mapToLong(val_conv_19 -> val_conv_19 == null ? 0 : val_conv_19.ptr & ~1).toArray());
                /* TODO 2 UpdateFulfillHTLC  */;
        }
 
        public void set_update_fail_htlcs(UpdateFailHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, Arrays.stream(val).mapToLong(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, Arrays.stream(val).mapToLong(val_conv_16 -> val_conv_16 == null ? 0 : val_conv_16.ptr & ~1).toArray());
                /* TODO 2 UpdateFailHTLC  */;
        }
 
        public void set_update_fail_malformed_htlcs(UpdateFailMalformedHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, Arrays.stream(val).mapToLong(arr_conv_25 -> arr_conv_25 == null ? 0 : arr_conv_25.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, Arrays.stream(val).mapToLong(val_conv_25 -> val_conv_25 == null ? 0 : val_conv_25.ptr & ~1).toArray());
                /* TODO 2 UpdateFailMalformedHTLC  */;
        }
 
@@ -66,7 +59,7 @@ public class CommitmentUpdate extends CommonBase {
        }
 
        public static CommitmentUpdate constructor_new(UpdateAddHTLC[] update_add_htlcs_arg, UpdateFulfillHTLC[] update_fulfill_htlcs_arg, UpdateFailHTLC[] update_fail_htlcs_arg, UpdateFailMalformedHTLC[] update_fail_malformed_htlcs_arg, UpdateFee update_fee_arg, CommitmentSigned commitment_signed_arg) {
-               long ret = bindings.CommitmentUpdate_new(Arrays.stream(update_add_htlcs_arg).mapToLong(arr_conv_15 -> arr_conv_15 == null ? 0 : arr_conv_15.ptr & ~1).toArray(), Arrays.stream(update_fulfill_htlcs_arg).mapToLong(arr_conv_19 -> arr_conv_19 == null ? 0 : arr_conv_19.ptr & ~1).toArray(), Arrays.stream(update_fail_htlcs_arg).mapToLong(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray(), Arrays.stream(update_fail_malformed_htlcs_arg).mapToLong(arr_conv_25 -> arr_conv_25 == null ? 0 : arr_conv_25.ptr & ~1).toArray(), update_fee_arg == null ? 0 : update_fee_arg.ptr & ~1, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr & ~1);
+               long ret = bindings.CommitmentUpdate_new(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 & ~1).toArray(), 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 & ~1).toArray(), 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 & ~1).toArray(), 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 & ~1).toArray(), update_fee_arg == null ? 0 : update_fee_arg.ptr & ~1, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr & ~1);
                CommitmentUpdate ret_hu_conv = new CommitmentUpdate(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                /* TODO 2 UpdateAddHTLC  */;
@@ -78,4 +71,11 @@ public class CommitmentUpdate extends CommonBase {
                return ret_hu_conv;
        }
 
+       public CommitmentUpdate clone() {
+               long ret = bindings.CommitmentUpdate_clone(this.ptr);
+               CommitmentUpdate ret_hu_conv = new CommitmentUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 5cabe932481a4cfcdd1fc535d66e243bf8bdd055..ae2d77cc9d95332ae1c23050eca5fc473d6ff1e6 100644 (file)
@@ -14,13 +14,6 @@ public class CounterpartyChannelTransactionParameters extends CommonBase {
                if (ptr != 0) { bindings.CounterpartyChannelTransactionParameters_free(ptr); }
        }
 
-       public CounterpartyChannelTransactionParameters clone() {
-               long ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr);
-               CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelPublicKeys get_pubkeys() {
                long ret = bindings.CounterpartyChannelTransactionParameters_get_pubkeys(this.ptr);
                ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
@@ -50,15 +43,21 @@ public class CounterpartyChannelTransactionParameters extends CommonBase {
                return ret_hu_conv;
        }
 
+       public CounterpartyChannelTransactionParameters clone() {
+               long ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr);
+               CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.CounterpartyChannelTransactionParameters_write(this.ptr);
                return ret;
        }
 
-       public static CounterpartyChannelTransactionParameters constructor_read(byte[] ser) {
+       public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.CounterpartyChannelTransactionParameters_read(ser);
-               CounterpartyChannelTransactionParameters ret_hu_conv = new CounterpartyChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 63db5eef41e4c627b6438f7d2efca0dfecd1ba6e..4d0e79d4921dfa4bc9e495186cf4fa6132633046 100644 (file)
@@ -14,13 +14,6 @@ public class DataLossProtect extends CommonBase {
                if (ptr != 0) { bindings.DataLossProtect_free(ptr); }
        }
 
-       public DataLossProtect clone() {
-               long ret = bindings.DataLossProtect_clone(this.ptr);
-               DataLossProtect ret_hu_conv = new DataLossProtect(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_your_last_per_commitment_secret() {
                byte[] ret = bindings.DataLossProtect_get_your_last_per_commitment_secret(this.ptr);
                return ret;
@@ -46,4 +39,11 @@ public class DataLossProtect extends CommonBase {
                return ret_hu_conv;
        }
 
+       public DataLossProtect clone() {
+               long ret = bindings.DataLossProtect_clone(this.ptr);
+               DataLossProtect ret_hu_conv = new DataLossProtect(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
diff --git a/src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java b/src/main/java/org/ldk/structs/DelayedPaymentOutputDescriptor.java
new file mode 100644 (file)
index 0000000..fd70cb9
--- /dev/null
@@ -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;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class DelayedPaymentOutputDescriptor extends CommonBase {
+       DelayedPaymentOutputDescriptor(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.DelayedPaymentOutputDescriptor_free(ptr); }
+       }
+
+       public OutPoint get_outpoint() {
+               long ret = bindings.DelayedPaymentOutputDescriptor_get_outpoint(this.ptr);
+               OutPoint ret_hu_conv = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_outpoint(OutPoint val) {
+               bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
+               this.ptrs_to.add(val);
+       }
+
+       public byte[] get_per_commitment_point() {
+               byte[] ret = bindings.DelayedPaymentOutputDescriptor_get_per_commitment_point(this.ptr);
+               return ret;
+       }
+
+       public void set_per_commitment_point(byte[] val) {
+               bindings.DelayedPaymentOutputDescriptor_set_per_commitment_point(this.ptr, val);
+       }
+
+       public short get_to_self_delay() {
+               short ret = bindings.DelayedPaymentOutputDescriptor_get_to_self_delay(this.ptr);
+               return ret;
+       }
+
+       public void set_to_self_delay(short val) {
+               bindings.DelayedPaymentOutputDescriptor_set_to_self_delay(this.ptr, val);
+       }
+
+       public void set_output(TxOut val) {
+               bindings.DelayedPaymentOutputDescriptor_set_output(this.ptr, val.ptr);
+       }
+
+       public byte[] get_revocation_pubkey() {
+               byte[] ret = bindings.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this.ptr);
+               return ret;
+       }
+
+       public void set_revocation_pubkey(byte[] val) {
+               bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val);
+       }
+
+       public byte[] get_channel_keys_id() {
+               byte[] ret = bindings.DelayedPaymentOutputDescriptor_get_channel_keys_id(this.ptr);
+               return ret;
+       }
+
+       public void set_channel_keys_id(byte[] val) {
+               bindings.DelayedPaymentOutputDescriptor_set_channel_keys_id(this.ptr, val);
+       }
+
+       public long get_channel_value_satoshis() {
+               long ret = bindings.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this.ptr);
+               return ret;
+       }
+
+       public void set_channel_value_satoshis(long val) {
+               bindings.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this.ptr, val);
+       }
+
+       public static DelayedPaymentOutputDescriptor constructor_new(OutPoint outpoint_arg, byte[] per_commitment_point_arg, short to_self_delay_arg, TxOut output_arg, byte[] 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 & ~1, per_commitment_point_arg, to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg, channel_keys_id_arg, channel_value_satoshis_arg);
+               DelayedPaymentOutputDescriptor ret_hu_conv = new DelayedPaymentOutputDescriptor(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(outpoint_arg);
+               return ret_hu_conv;
+       }
+
+       public DelayedPaymentOutputDescriptor clone() {
+               long ret = bindings.DelayedPaymentOutputDescriptor_clone(this.ptr);
+               DelayedPaymentOutputDescriptor ret_hu_conv = new DelayedPaymentOutputDescriptor(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}
index 82ec50918f8eda135cfc04f5237de4d8dfdb11b1..8e51c3f245195a973a8d1d60d2f98397ff238eff 100644 (file)
@@ -14,13 +14,6 @@ public class DirectionalChannelInfo extends CommonBase {
                if (ptr != 0) { bindings.DirectionalChannelInfo_free(ptr); }
        }
 
-       public DirectionalChannelInfo clone() {
-               long ret = bindings.DirectionalChannelInfo_clone(this.ptr);
-               DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public int get_last_update() {
                int ret = bindings.DirectionalChannelInfo_get_last_update(this.ptr);
                return ret;
@@ -81,15 +74,21 @@ public class DirectionalChannelInfo extends CommonBase {
                this.ptrs_to.add(val);
        }
 
+       public DirectionalChannelInfo clone() {
+               long ret = bindings.DirectionalChannelInfo_clone(this.ptr);
+               DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.DirectionalChannelInfo_write(this.ptr);
                return ret;
        }
 
-       public static DirectionalChannelInfo constructor_read(byte[] ser) {
+       public static Result_DirectionalChannelInfoDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.DirectionalChannelInfo_read(ser);
-               DirectionalChannelInfo ret_hu_conv = new DirectionalChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a90b207bd5ec08597d6b85b9cca7e1fe14d8111b..8e1f30ddcb36824b2c8ebb90bcddc8b1baa3eac7 100644 (file)
@@ -14,13 +14,6 @@ public class ErrorMessage extends CommonBase {
                if (ptr != 0) { bindings.ErrorMessage_free(ptr); }
        }
 
-       public ErrorMessage clone() {
-               long ret = bindings.ErrorMessage_clone(this.ptr);
-               ErrorMessage ret_hu_conv = new ErrorMessage(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.ErrorMessage_get_channel_id(this.ptr);
                return ret;
@@ -46,6 +39,13 @@ public class ErrorMessage extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ErrorMessage clone() {
+               long ret = bindings.ErrorMessage_clone(this.ptr);
+               ErrorMessage ret_hu_conv = new ErrorMessage(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.ErrorMessage_write(this.ptr);
                return ret;
diff --git a/src/main/java/org/ldk/structs/ErroringMessageHandler.java b/src/main/java/org/ldk/structs/ErroringMessageHandler.java
new file mode 100644 (file)
index 0000000..3b8ce07
--- /dev/null
@@ -0,0 +1,38 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class ErroringMessageHandler extends CommonBase {
+       ErroringMessageHandler(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.ErroringMessageHandler_free(ptr); }
+       }
+
+       public static ErroringMessageHandler constructor_new() {
+               long ret = bindings.ErroringMessageHandler_new();
+               ErroringMessageHandler ret_hu_conv = new ErroringMessageHandler(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public MessageSendEventsProvider as_MessageSendEventsProvider() {
+               long ret = bindings.ErroringMessageHandler_as_MessageSendEventsProvider(this.ptr);
+               MessageSendEventsProvider ret_hu_conv = new MessageSendEventsProvider(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public ChannelMessageHandler as_ChannelMessageHandler() {
+               long ret = bindings.ErroringMessageHandler_as_ChannelMessageHandler(this.ptr);
+               ChannelMessageHandler ret_hu_conv = new ChannelMessageHandler(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}
index 83ffeb55913addf4f0024969ee1bab816ea9d59a..abc24cecb67d30afd7de75a275f0ebed81e4fa28 100644 (file)
@@ -103,14 +103,14 @@ public class Event extends CommonBase {
                private SpendableOutputs(long ptr, bindings.LDKEvent.SpendableOutputs obj) {
                        super(null, ptr);
                        long[] outputs = obj.outputs;
-                       SpendableOutputDescriptor[] arr_conv_27_arr = new SpendableOutputDescriptor[outputs.length];
+                       SpendableOutputDescriptor[] outputs_conv_27_arr = new SpendableOutputDescriptor[outputs.length];
                        for (int b = 0; b < outputs.length; b++) {
-                               long arr_conv_27 = outputs[b];
-                               SpendableOutputDescriptor arr_conv_27_hu_conv = SpendableOutputDescriptor.constr_from_ptr(arr_conv_27);
-                               arr_conv_27_hu_conv.ptrs_to.add(this);
-                               arr_conv_27_arr[b] = arr_conv_27_hu_conv;
+                               long outputs_conv_27 = outputs[b];
+                               SpendableOutputDescriptor outputs_conv_27_hu_conv = SpendableOutputDescriptor.constr_from_ptr(outputs_conv_27);
+                               outputs_conv_27_hu_conv.ptrs_to.add(this);
+                               outputs_conv_27_arr[b] = outputs_conv_27_hu_conv;
                        }
-                       this.outputs = arr_conv_27_arr;
+                       this.outputs = outputs_conv_27_arr;
                }
        }
 }
index f7218d2b1e63a70b92d0b54aafda2c6bc38d54a7..7bcb3367d63ffaab7f515a6cf7cdafb76d7ce3c1 100644 (file)
@@ -28,7 +28,7 @@ public class EventsProvider extends CommonBase {
                impl_holder.held = new EventsProvider(new bindings.LDKEventsProvider() {
                        @Override public long[] get_and_clear_pending_events() {
                                Event[] ret = arg.get_and_clear_pending_events();
-                               long[] result = Arrays.stream(ret).mapToLong(arr_conv_7 -> arr_conv_7.ptr).toArray();
+                               long[] result = Arrays.stream(ret).mapToLong(ret_conv_7 -> ret_conv_7.ptr).toArray();
                                /* TODO 2 Event  */;
                                return result;
                        }
@@ -37,14 +37,14 @@ public class EventsProvider extends CommonBase {
        }
        public Event[] get_and_clear_pending_events() {
                long[] ret = bindings.EventsProvider_get_and_clear_pending_events(this.ptr);
-               Event[] arr_conv_7_arr = new Event[ret.length];
+               Event[] ret_conv_7_arr = new Event[ret.length];
                for (int h = 0; h < ret.length; h++) {
-                       long arr_conv_7 = ret[h];
-                       Event arr_conv_7_hu_conv = Event.constr_from_ptr(arr_conv_7);
-                       arr_conv_7_hu_conv.ptrs_to.add(this);
-                       arr_conv_7_arr[h] = arr_conv_7_hu_conv;
+                       long ret_conv_7 = ret[h];
+                       Event ret_conv_7_hu_conv = Event.constr_from_ptr(ret_conv_7);
+                       ret_conv_7_hu_conv.ptrs_to.add(this);
+                       ret_conv_7_arr[h] = ret_conv_7_hu_conv;
                }
-               return arr_conv_7_arr;
+               return ret_conv_7_arr;
        }
 
 }
index 7687561d5f65f9520e1ed54d4505783825e4ef8e..c6388db582bee41800f7eb73180e4e82e037e45d 100644 (file)
@@ -14,13 +14,6 @@ public class FundingCreated extends CommonBase {
                if (ptr != 0) { bindings.FundingCreated_free(ptr); }
        }
 
-       public FundingCreated clone() {
-               long ret = bindings.FundingCreated_clone(this.ptr);
-               FundingCreated ret_hu_conv = new FundingCreated(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_temporary_channel_id() {
                byte[] ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr);
                return ret;
@@ -64,15 +57,21 @@ public class FundingCreated extends CommonBase {
                return ret_hu_conv;
        }
 
+       public FundingCreated clone() {
+               long ret = bindings.FundingCreated_clone(this.ptr);
+               FundingCreated ret_hu_conv = new FundingCreated(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.FundingCreated_write(this.ptr);
                return ret;
        }
 
-       public static FundingCreated constructor_read(byte[] ser) {
+       public static Result_FundingCreatedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.FundingCreated_read(ser);
-               FundingCreated ret_hu_conv = new FundingCreated(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 4439697f84b16da44478418bea75ed77a341dc09..0462f1a07c8326c9fee3e0823999bac936256687 100644 (file)
@@ -14,13 +14,6 @@ public class FundingLocked extends CommonBase {
                if (ptr != 0) { bindings.FundingLocked_free(ptr); }
        }
 
-       public FundingLocked clone() {
-               long ret = bindings.FundingLocked_clone(this.ptr);
-               FundingLocked ret_hu_conv = new FundingLocked(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.FundingLocked_get_channel_id(this.ptr);
                return ret;
@@ -46,15 +39,21 @@ public class FundingLocked extends CommonBase {
                return ret_hu_conv;
        }
 
+       public FundingLocked clone() {
+               long ret = bindings.FundingLocked_clone(this.ptr);
+               FundingLocked ret_hu_conv = new FundingLocked(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.FundingLocked_write(this.ptr);
                return ret;
        }
 
-       public static FundingLocked constructor_read(byte[] ser) {
+       public static Result_FundingLockedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.FundingLocked_read(ser);
-               FundingLocked ret_hu_conv = new FundingLocked(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index d8566044d45d6c8815e0591456a2766802f5476a..e4241d920873e73b19028899d4d054c40e8d22f0 100644 (file)
@@ -14,13 +14,6 @@ public class FundingSigned extends CommonBase {
                if (ptr != 0) { bindings.FundingSigned_free(ptr); }
        }
 
-       public FundingSigned clone() {
-               long ret = bindings.FundingSigned_clone(this.ptr);
-               FundingSigned ret_hu_conv = new FundingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.FundingSigned_get_channel_id(this.ptr);
                return ret;
@@ -46,15 +39,21 @@ public class FundingSigned extends CommonBase {
                return ret_hu_conv;
        }
 
+       public FundingSigned clone() {
+               long ret = bindings.FundingSigned_clone(this.ptr);
+               FundingSigned ret_hu_conv = new FundingSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.FundingSigned_write(this.ptr);
                return ret;
        }
 
-       public static FundingSigned constructor_read(byte[] ser) {
+       public static Result_FundingSignedDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.FundingSigned_read(ser);
-               FundingSigned ret_hu_conv = new FundingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 55458e73140263db4c879fe9852f42bb4a3977f0..7f935692e5437f1a4665c21d21d5c3bb8b0cdc25 100644 (file)
@@ -14,13 +14,6 @@ public class GossipTimestampFilter extends CommonBase {
                if (ptr != 0) { bindings.GossipTimestampFilter_free(ptr); }
        }
 
-       public GossipTimestampFilter clone() {
-               long ret = bindings.GossipTimestampFilter_clone(this.ptr);
-               GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.GossipTimestampFilter_get_chain_hash(this.ptr);
                return ret;
@@ -55,6 +48,13 @@ public class GossipTimestampFilter extends CommonBase {
                return ret_hu_conv;
        }
 
+       public GossipTimestampFilter clone() {
+               long ret = bindings.GossipTimestampFilter_clone(this.ptr);
+               GossipTimestampFilter ret_hu_conv = new GossipTimestampFilter(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_GossipTimestampFilterDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.GossipTimestampFilter_read(ser);
                Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
index daa1c42d5d0499044cdda92f5db7d0c6cafebcb2..ea8dd2cbe09fcecb04d84c01ab832bcbe7bb57fa 100644 (file)
@@ -14,13 +14,6 @@ public class HTLCOutputInCommitment extends CommonBase {
                if (ptr != 0) { bindings.HTLCOutputInCommitment_free(ptr); }
        }
 
-       public HTLCOutputInCommitment clone() {
-               long ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
-               HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public boolean get_offered() {
                boolean ret = bindings.HTLCOutputInCommitment_get_offered(this.ptr);
                return ret;
@@ -57,15 +50,21 @@ public class HTLCOutputInCommitment extends CommonBase {
                bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
        }
 
+       public HTLCOutputInCommitment clone() {
+               long ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
+               HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.HTLCOutputInCommitment_write(this.ptr);
                return ret;
        }
 
-       public static HTLCOutputInCommitment constructor_read(byte[] ser) {
+       public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.HTLCOutputInCommitment_read(ser);
-               HTLCOutputInCommitment ret_hu_conv = new HTLCOutputInCommitment(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index f860f5dd8d464efbb8c23af4ee182f3a0d4d12ae..57f94ec2202165b714d91a7712ce81070e476f1c 100644 (file)
@@ -26,10 +26,9 @@ public class HTLCUpdate extends CommonBase {
                return ret;
        }
 
-       public static HTLCUpdate constructor_read(byte[] ser) {
+       public static Result_HTLCUpdateDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.HTLCUpdate_read(ser);
-               HTLCUpdate ret_hu_conv = new HTLCUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 584c9b7612e6e032f813180bb47be0fec77545db..2ca98f51c8b9f0020ae6ea439d1cd0f81b8f191b 100644 (file)
@@ -14,13 +14,6 @@ public class HolderCommitmentTransaction extends CommonBase {
                if (ptr != 0) { bindings.HolderCommitmentTransaction_free(ptr); }
        }
 
-       public HolderCommitmentTransaction clone() {
-               long ret = bindings.HolderCommitmentTransaction_clone(this.ptr);
-               HolderCommitmentTransaction ret_hu_conv = new HolderCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_counterparty_sig() {
                byte[] ret = bindings.HolderCommitmentTransaction_get_counterparty_sig(this.ptr);
                return ret;
@@ -34,15 +27,21 @@ public class HolderCommitmentTransaction extends CommonBase {
                bindings.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this.ptr, val);
        }
 
+       public HolderCommitmentTransaction clone() {
+               long ret = bindings.HolderCommitmentTransaction_clone(this.ptr);
+               HolderCommitmentTransaction ret_hu_conv = new HolderCommitmentTransaction(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.HolderCommitmentTransaction_write(this.ptr);
                return ret;
        }
 
-       public static HolderCommitmentTransaction constructor_read(byte[] ser) {
+       public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.HolderCommitmentTransaction_read(ser);
-               HolderCommitmentTransaction ret_hu_conv = new HolderCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
diff --git a/src/main/java/org/ldk/structs/IgnoringMessageHandler.java b/src/main/java/org/ldk/structs/IgnoringMessageHandler.java
new file mode 100644 (file)
index 0000000..65ca6c6
--- /dev/null
@@ -0,0 +1,38 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class IgnoringMessageHandler extends CommonBase {
+       IgnoringMessageHandler(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.IgnoringMessageHandler_free(ptr); }
+       }
+
+       public static IgnoringMessageHandler constructor_new() {
+               long ret = bindings.IgnoringMessageHandler_new();
+               IgnoringMessageHandler ret_hu_conv = new IgnoringMessageHandler(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public MessageSendEventsProvider as_MessageSendEventsProvider() {
+               long ret = bindings.IgnoringMessageHandler_as_MessageSendEventsProvider(this.ptr);
+               MessageSendEventsProvider ret_hu_conv = new MessageSendEventsProvider(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public RoutingMessageHandler as_RoutingMessageHandler() {
+               long ret = bindings.IgnoringMessageHandler_as_RoutingMessageHandler(this.ptr);
+               RoutingMessageHandler ret_hu_conv = new RoutingMessageHandler(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/src/main/java/org/ldk/structs/InMemoryChannelKeys.java b/src/main/java/org/ldk/structs/InMemoryChannelKeys.java
deleted file mode 100644 (file)
index 45345a4..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class InMemoryChannelKeys extends CommonBase {
-       InMemoryChannelKeys(Object _dummy, long ptr) { super(ptr); }
-       @Override @SuppressWarnings("deprecation")
-       protected void finalize() throws Throwable {
-               super.finalize();
-               if (ptr != 0) { bindings.InMemoryChannelKeys_free(ptr); }
-       }
-
-       public InMemoryChannelKeys clone() {
-               long ret = bindings.InMemoryChannelKeys_clone(this.ptr);
-               InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public byte[] get_funding_key() {
-               byte[] ret = bindings.InMemoryChannelKeys_get_funding_key(this.ptr);
-               return ret;
-       }
-
-       public void set_funding_key(byte[] val) {
-               bindings.InMemoryChannelKeys_set_funding_key(this.ptr, val);
-       }
-
-       public byte[] get_revocation_base_key() {
-               byte[] ret = bindings.InMemoryChannelKeys_get_revocation_base_key(this.ptr);
-               return ret;
-       }
-
-       public void set_revocation_base_key(byte[] val) {
-               bindings.InMemoryChannelKeys_set_revocation_base_key(this.ptr, val);
-       }
-
-       public byte[] get_payment_key() {
-               byte[] ret = bindings.InMemoryChannelKeys_get_payment_key(this.ptr);
-               return ret;
-       }
-
-       public void set_payment_key(byte[] val) {
-               bindings.InMemoryChannelKeys_set_payment_key(this.ptr, val);
-       }
-
-       public byte[] get_delayed_payment_base_key() {
-               byte[] ret = bindings.InMemoryChannelKeys_get_delayed_payment_base_key(this.ptr);
-               return ret;
-       }
-
-       public void set_delayed_payment_base_key(byte[] val) {
-               bindings.InMemoryChannelKeys_set_delayed_payment_base_key(this.ptr, val);
-       }
-
-       public byte[] get_htlc_base_key() {
-               byte[] ret = bindings.InMemoryChannelKeys_get_htlc_base_key(this.ptr);
-               return ret;
-       }
-
-       public void set_htlc_base_key(byte[] val) {
-               bindings.InMemoryChannelKeys_set_htlc_base_key(this.ptr, val);
-       }
-
-       public byte[] get_commitment_seed() {
-               byte[] ret = bindings.InMemoryChannelKeys_get_commitment_seed(this.ptr);
-               return ret;
-       }
-
-       public void set_commitment_seed(byte[] val) {
-               bindings.InMemoryChannelKeys_set_commitment_seed(this.ptr, val);
-       }
-
-       public static InMemoryChannelKeys constructor_new(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, TwoTuple<Long, Long> key_derivation_params) {
-               long ret = bindings.InMemoryChannelKeys_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, bindings.C2Tuple_u64u64Z_new(key_derivation_params.a, key_derivation_params.b));
-               InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               return ret_hu_conv;
-       }
-
-       public ChannelPublicKeys counterparty_pubkeys() {
-               long ret = bindings.InMemoryChannelKeys_counterparty_pubkeys(this.ptr);
-               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public short counterparty_selected_contest_delay() {
-               short ret = bindings.InMemoryChannelKeys_counterparty_selected_contest_delay(this.ptr);
-               return ret;
-       }
-
-       public short holder_selected_contest_delay() {
-               short ret = bindings.InMemoryChannelKeys_holder_selected_contest_delay(this.ptr);
-               return ret;
-       }
-
-       public boolean is_outbound() {
-               boolean ret = bindings.InMemoryChannelKeys_is_outbound(this.ptr);
-               return ret;
-       }
-
-       public OutPoint funding_outpoint() {
-               long ret = bindings.InMemoryChannelKeys_funding_outpoint(this.ptr);
-               OutPoint ret_hu_conv = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public ChannelTransactionParameters get_channel_parameters() {
-               long ret = bindings.InMemoryChannelKeys_get_channel_parameters(this.ptr);
-               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public ChannelKeys as_ChannelKeys() {
-               long ret = bindings.InMemoryChannelKeys_as_ChannelKeys(this.ptr);
-               ChannelKeys ret_hu_conv = new ChannelKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public byte[] write() {
-               byte[] ret = bindings.InMemoryChannelKeys_write(this.ptr);
-               return ret;
-       }
-
-       public static Result_InMemoryChannelKeysDecodeErrorZ constructor_read(byte[] ser) {
-               long ret = bindings.InMemoryChannelKeys_read(ser);
-               Result_InMemoryChannelKeysDecodeErrorZ ret_hu_conv = Result_InMemoryChannelKeysDecodeErrorZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
-}
diff --git a/src/main/java/org/ldk/structs/InMemorySigner.java b/src/main/java/org/ldk/structs/InMemorySigner.java
new file mode 100644 (file)
index 0000000..5bf7ca9
--- /dev/null
@@ -0,0 +1,153 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class InMemorySigner extends CommonBase {
+       InMemorySigner(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.InMemorySigner_free(ptr); }
+       }
+
+       public byte[] get_funding_key() {
+               byte[] ret = bindings.InMemorySigner_get_funding_key(this.ptr);
+               return ret;
+       }
+
+       public void set_funding_key(byte[] val) {
+               bindings.InMemorySigner_set_funding_key(this.ptr, val);
+       }
+
+       public byte[] get_revocation_base_key() {
+               byte[] ret = bindings.InMemorySigner_get_revocation_base_key(this.ptr);
+               return ret;
+       }
+
+       public void set_revocation_base_key(byte[] val) {
+               bindings.InMemorySigner_set_revocation_base_key(this.ptr, val);
+       }
+
+       public byte[] get_payment_key() {
+               byte[] ret = bindings.InMemorySigner_get_payment_key(this.ptr);
+               return ret;
+       }
+
+       public void set_payment_key(byte[] val) {
+               bindings.InMemorySigner_set_payment_key(this.ptr, val);
+       }
+
+       public byte[] get_delayed_payment_base_key() {
+               byte[] ret = bindings.InMemorySigner_get_delayed_payment_base_key(this.ptr);
+               return ret;
+       }
+
+       public void set_delayed_payment_base_key(byte[] val) {
+               bindings.InMemorySigner_set_delayed_payment_base_key(this.ptr, val);
+       }
+
+       public byte[] get_htlc_base_key() {
+               byte[] ret = bindings.InMemorySigner_get_htlc_base_key(this.ptr);
+               return ret;
+       }
+
+       public void set_htlc_base_key(byte[] val) {
+               bindings.InMemorySigner_set_htlc_base_key(this.ptr, val);
+       }
+
+       public byte[] get_commitment_seed() {
+               byte[] ret = bindings.InMemorySigner_get_commitment_seed(this.ptr);
+               return ret;
+       }
+
+       public void set_commitment_seed(byte[] val) {
+               bindings.InMemorySigner_set_commitment_seed(this.ptr, val);
+       }
+
+       public InMemorySigner clone() {
+               long ret = bindings.InMemorySigner_clone(this.ptr);
+               InMemorySigner ret_hu_conv = new InMemorySigner(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static InMemorySigner constructor_new(byte[] funding_key, byte[] revocation_base_key, byte[] payment_key, byte[] delayed_payment_base_key, byte[] htlc_base_key, byte[] commitment_seed, long channel_value_satoshis, byte[] channel_keys_id) {
+               long ret = bindings.InMemorySigner_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, channel_keys_id);
+               InMemorySigner ret_hu_conv = new InMemorySigner(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public ChannelPublicKeys counterparty_pubkeys() {
+               long ret = bindings.InMemorySigner_counterparty_pubkeys(this.ptr);
+               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public short counterparty_selected_contest_delay() {
+               short ret = bindings.InMemorySigner_counterparty_selected_contest_delay(this.ptr);
+               return ret;
+       }
+
+       public short holder_selected_contest_delay() {
+               short ret = bindings.InMemorySigner_holder_selected_contest_delay(this.ptr);
+               return ret;
+       }
+
+       public boolean is_outbound() {
+               boolean ret = bindings.InMemorySigner_is_outbound(this.ptr);
+               return ret;
+       }
+
+       public OutPoint funding_outpoint() {
+               long ret = bindings.InMemorySigner_funding_outpoint(this.ptr);
+               OutPoint ret_hu_conv = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public ChannelTransactionParameters get_channel_parameters() {
+               long ret = bindings.InMemorySigner_get_channel_parameters(this.ptr);
+               ChannelTransactionParameters ret_hu_conv = new ChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public Result_CVec_CVec_u8ZZNoneZ sign_counterparty_payment_input(byte[] spend_tx, long input_idx, StaticPaymentOutputDescriptor descriptor) {
+               long ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr & ~1);
+               Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(descriptor);
+               return ret_hu_conv;
+       }
+
+       public Result_CVec_CVec_u8ZZNoneZ sign_dynamic_p2wsh_input(byte[] spend_tx, long input_idx, DelayedPaymentOutputDescriptor descriptor) {
+               long ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr & ~1);
+               Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(descriptor);
+               return ret_hu_conv;
+       }
+
+       public Sign as_Sign() {
+               long ret = bindings.InMemorySigner_as_Sign(this.ptr);
+               Sign ret_hu_conv = new Sign(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public byte[] write() {
+               byte[] ret = bindings.InMemorySigner_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_InMemorySignerDecodeErrorZ constructor_read(byte[] ser) {
+               long ret = bindings.InMemorySigner_read(ser);
+               Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index cadc4f31331372ce79ba138ae202d5ae9afda0b8..867b1ab93e20ebab6a89ebf342525a8403faf1d2 100644 (file)
@@ -14,6 +14,26 @@ public class Init extends CommonBase {
                if (ptr != 0) { bindings.Init_free(ptr); }
        }
 
+       public InitFeatures get_features() {
+               long ret = bindings.Init_get_features(this.ptr);
+               InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_features(InitFeatures val) {
+               bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
+               this.ptrs_to.add(val);
+       }
+
+       public static Init constructor_new(InitFeatures features_arg) {
+               long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr & ~1);
+               Init ret_hu_conv = new Init(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(features_arg);
+               return ret_hu_conv;
+       }
+
        public Init clone() {
                long ret = bindings.Init_clone(this.ptr);
                Init ret_hu_conv = new Init(null, ret);
index f4d8a7e8bf70838e0d69b1fe6e68db37df66139f..2ab513ac31e753c20f26a8780156bd69a377b88c 100644 (file)
@@ -14,4 +14,36 @@ public class InitFeatures extends CommonBase {
                if (ptr != 0) { bindings.InitFeatures_free(ptr); }
        }
 
+       public InitFeatures clone() {
+               long ret = bindings.InitFeatures_clone(this.ptr);
+               InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static InitFeatures constructor_empty() {
+               long ret = bindings.InitFeatures_empty();
+               InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static InitFeatures constructor_known() {
+               long ret = bindings.InitFeatures_known();
+               InitFeatures ret_hu_conv = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public byte[] write() {
+               byte[] ret = bindings.InitFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_InitFeaturesDecodeErrorZ constructor_read(byte[] ser) {
+               long ret = bindings.InitFeatures_read(ser);
+               Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 46148adf1835cfaad837a61fbf740dfcab858a59..d3463631db8a6f09ac8fa9a7e95f3af5fc4e82c5 100644 (file)
@@ -23,9 +23,9 @@ public class KeysInterface extends CommonBase {
                byte[] get_node_secret();
                byte[] get_destination_script();
                byte[] get_shutdown_pubkey();
-               ChannelKeys get_channel_keys(boolean inbound, long channel_value_satoshis);
+               Sign get_channel_signer(boolean inbound, long channel_value_satoshis);
                byte[] get_secure_random_bytes();
-               Result_ChanKeySignerDecodeErrorZ read_chan_signer(byte[] reader);
+               Result_SignDecodeErrorZ read_chan_signer(byte[] reader);
        }
        private static class LDKKeysInterfaceHolder { KeysInterface held; }
        public static KeysInterface new_impl(KeysInterfaceInterface arg) {
@@ -43,8 +43,8 @@ public class KeysInterface extends CommonBase {
                                byte[] ret = arg.get_shutdown_pubkey();
                                return ret;
                        }
-                       @Override public long get_channel_keys(boolean inbound, long channel_value_satoshis) {
-                               ChannelKeys ret = arg.get_channel_keys(inbound, channel_value_satoshis);
+                       @Override public long get_channel_signer(boolean inbound, long channel_value_satoshis) {
+                               Sign ret = arg.get_channel_signer(inbound, channel_value_satoshis);
                                long result = ret == null ? 0 : ret.ptr;
                                impl_holder.held.ptrs_to.add(ret);
                                return result;
@@ -54,7 +54,7 @@ public class KeysInterface extends CommonBase {
                                return ret;
                        }
                        @Override public long read_chan_signer(byte[] reader) {
-                               Result_ChanKeySignerDecodeErrorZ ret = arg.read_chan_signer(reader);
+                               Result_SignDecodeErrorZ ret = arg.read_chan_signer(reader);
                                long result = ret != null ? ret.ptr : 0;
                                return result;
                        }
@@ -76,9 +76,9 @@ public class KeysInterface extends CommonBase {
                return ret;
        }
 
-       public ChannelKeys get_channel_keys(boolean inbound, long channel_value_satoshis) {
-               long ret = bindings.KeysInterface_get_channel_keys(this.ptr, inbound, channel_value_satoshis);
-               ChannelKeys ret_hu_conv = new ChannelKeys(null, ret);
+       public Sign get_channel_signer(boolean inbound, long channel_value_satoshis) {
+               long ret = bindings.KeysInterface_get_channel_signer(this.ptr, inbound, channel_value_satoshis);
+               Sign ret_hu_conv = new Sign(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -88,9 +88,9 @@ public class KeysInterface extends CommonBase {
                return ret;
        }
 
-       public Result_ChanKeySignerDecodeErrorZ read_chan_signer(byte[] reader) {
+       public Result_SignDecodeErrorZ read_chan_signer(byte[] reader) {
                long ret = bindings.KeysInterface_read_chan_signer(this.ptr, reader);
-               Result_ChanKeySignerDecodeErrorZ ret_hu_conv = Result_ChanKeySignerDecodeErrorZ.constr_from_ptr(ret);
+               Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 16a4a87312f9ae6c98eebf168037c7622930fe49..c0c4cfe6b3525854f39d1fe564df577020983244 100644 (file)
@@ -14,20 +14,28 @@ public class KeysManager extends CommonBase {
                if (ptr != 0) { bindings.KeysManager_free(ptr); }
        }
 
-       public static KeysManager constructor_new(byte[] seed, LDKNetwork network, long starting_time_secs, int starting_time_nanos) {
-               long ret = bindings.KeysManager_new(seed, network, starting_time_secs, starting_time_nanos);
+       public static KeysManager constructor_new(byte[] seed, long starting_time_secs, int starting_time_nanos) {
+               long ret = bindings.KeysManager_new(seed, starting_time_secs, starting_time_nanos);
                KeysManager ret_hu_conv = new KeysManager(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public InMemoryChannelKeys derive_channel_keys(long channel_value_satoshis, long params_1, long params_2) {
-               long ret = bindings.KeysManager_derive_channel_keys(this.ptr, channel_value_satoshis, params_1, params_2);
-               InMemoryChannelKeys ret_hu_conv = new InMemoryChannelKeys(null, ret);
+       public InMemorySigner derive_channel_keys(long channel_value_satoshis, byte[] params) {
+               long ret = bindings.KeysManager_derive_channel_keys(this.ptr, channel_value_satoshis, params);
+               InMemorySigner ret_hu_conv = new InMemorySigner(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
+       public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, byte[] change_destination_script, int feerate_sat_per_1000_weight) {
+               long ret = bindings.KeysManager_spend_spendable_outputs(this.ptr, Arrays.stream(descriptors).mapToLong(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray(), Arrays.stream(outputs).mapToLong(outputs_conv_7 -> outputs_conv_7.ptr).toArray(), change_destination_script, feerate_sat_per_1000_weight);
+               Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+               /* TODO 2 SpendableOutputDescriptor  */;
+               /* TODO 2 TxOut  */;
+               return ret_hu_conv;
+       }
+
        public KeysInterface as_KeysInterface() {
                long ret = bindings.KeysManager_as_KeysInterface(this.ptr);
                KeysInterface ret_hu_conv = new KeysInterface(null, ret);
index b1793b3202bbfe1743ee6bfdd1245612a255de4f..d4138bf4fa4d3ae5921f7194dc2e9ed714ac19f2 100644 (file)
@@ -14,13 +14,6 @@ public class LightningError extends CommonBase {
                if (ptr != 0) { bindings.LightningError_free(ptr); }
        }
 
-       public LightningError clone() {
-               long ret = bindings.LightningError_clone(this.ptr);
-               LightningError ret_hu_conv = new LightningError(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public String get_err() {
                String ret = bindings.LightningError_get_err(this.ptr);
                return ret;
@@ -48,4 +41,11 @@ public class LightningError extends CommonBase {
                return ret_hu_conv;
        }
 
+       public LightningError clone() {
+               long ret = bindings.LightningError_clone(this.ptr);
+               LightningError ret_hu_conv = new LightningError(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
diff --git a/src/main/java/org/ldk/structs/Listen.java b/src/main/java/org/ldk/structs/Listen.java
new file mode 100644 (file)
index 0000000..075137c
--- /dev/null
@@ -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;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Listen extends CommonBase {
+       final bindings.LDKListen bindings_instance;
+       Listen(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+       private Listen(bindings.LDKListen arg) {
+               super(bindings.LDKListen_new(arg));
+               this.ptrs_to.add(arg);
+               this.bindings_instance = arg;
+       }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.Listen_free(ptr); } super.finalize();
+       }
+
+       public static interface ListenInterface {
+               void block_connected(byte[] block, int height);
+               void block_disconnected(byte[] header, int height);
+       }
+       private static class LDKListenHolder { Listen held; }
+       public static Listen new_impl(ListenInterface arg) {
+               final LDKListenHolder impl_holder = new LDKListenHolder();
+               impl_holder.held = new Listen(new bindings.LDKListen() {
+                       @Override public void block_connected(byte[] block, int height) {
+                               arg.block_connected(block, height);
+                       }
+                       @Override public void block_disconnected(byte[] header, int height) {
+                               arg.block_disconnected(header, height);
+                       }
+               });
+               return impl_holder.held;
+       }
+       public void block_connected(byte[] block, int height) {
+               bindings.Listen_block_connected(this.ptr, block, height);
+       }
+
+       public void block_disconnected(byte[] header, int height) {
+               bindings.Listen_block_disconnected(this.ptr, header, height);
+       }
+
+}
index 6237ba355e59e88824d40cd0ee1851176b519849..c8bc2387d89517f75b7baf3657074832c35b41c7 100644 (file)
@@ -28,7 +28,7 @@ public class MessageSendEventsProvider extends CommonBase {
                impl_holder.held = new MessageSendEventsProvider(new bindings.LDKMessageSendEventsProvider() {
                        @Override public long[] get_and_clear_pending_msg_events() {
                                MessageSendEvent[] ret = arg.get_and_clear_pending_msg_events();
-                               long[] result = Arrays.stream(ret).mapToLong(arr_conv_18 -> arr_conv_18.ptr).toArray();
+                               long[] result = Arrays.stream(ret).mapToLong(ret_conv_18 -> ret_conv_18.ptr).toArray();
                                /* TODO 2 MessageSendEvent  */;
                                return result;
                        }
@@ -37,14 +37,14 @@ public class MessageSendEventsProvider extends CommonBase {
        }
        public MessageSendEvent[] get_and_clear_pending_msg_events() {
                long[] ret = bindings.MessageSendEventsProvider_get_and_clear_pending_msg_events(this.ptr);
-               MessageSendEvent[] arr_conv_18_arr = new MessageSendEvent[ret.length];
+               MessageSendEvent[] ret_conv_18_arr = new MessageSendEvent[ret.length];
                for (int s = 0; s < ret.length; s++) {
-                       long arr_conv_18 = ret[s];
-                       MessageSendEvent arr_conv_18_hu_conv = MessageSendEvent.constr_from_ptr(arr_conv_18);
-                       arr_conv_18_hu_conv.ptrs_to.add(this);
-                       arr_conv_18_arr[s] = arr_conv_18_hu_conv;
+                       long ret_conv_18 = ret[s];
+                       MessageSendEvent ret_conv_18_hu_conv = MessageSendEvent.constr_from_ptr(ret_conv_18);
+                       ret_conv_18_hu_conv.ptrs_to.add(this);
+                       ret_conv_18_arr[s] = ret_conv_18_hu_conv;
                }
-               return arr_conv_18_arr;
+               return ret_conv_18_arr;
        }
 
 }
index 68106397b928559bd1f772e3d38b930c8189ded6..c6500e64fff13edc92b6c7483499517d364a62bf 100644 (file)
@@ -7,18 +7,31 @@ import java.util.Arrays;
 
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class MonitorEvent extends CommonBase {
-       MonitorEvent(Object _dummy, long ptr) { super(ptr); }
+       private MonitorEvent(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
                if (ptr != 0) { bindings.MonitorEvent_free(ptr); }
        }
-
-       public MonitorEvent clone() {
-               long ret = bindings.MonitorEvent_clone(this.ptr);
-               MonitorEvent ret_hu_conv = new MonitorEvent(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
+       static MonitorEvent constr_from_ptr(long ptr) {
+               bindings.LDKMonitorEvent raw_val = bindings.LDKMonitorEvent_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKMonitorEvent.HTLCEvent.class) {
+                       return new HTLCEvent(ptr, (bindings.LDKMonitorEvent.HTLCEvent)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKMonitorEvent.CommitmentTxBroadcasted.class) {
+                       return new CommitmentTxBroadcasted(ptr, (bindings.LDKMonitorEvent.CommitmentTxBroadcasted)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
        }
 
+       public final static class HTLCEvent extends MonitorEvent {
+               private HTLCEvent(long ptr, bindings.LDKMonitorEvent.HTLCEvent obj) {
+                       super(null, ptr);
+               }
+       }
+       public final static class CommitmentTxBroadcasted extends MonitorEvent {
+               private CommitmentTxBroadcasted(long ptr, bindings.LDKMonitorEvent.CommitmentTxBroadcasted obj) {
+                       super(null, ptr);
+               }
+       }
 }
index 2351063e62e0c262c7c52b835d8ef14b2aa32e3e..c3e2d406141d43f1e93498619d2828dbce17b1f9 100644 (file)
@@ -23,15 +23,21 @@ public class NetGraphMsgHandler extends CommonBase {
                return ret_hu_conv;
        }
 
-       public static NetGraphMsgHandler constructor_from_net_graph(Access chain_access, Logger logger, byte[] network_graph_genesis_hash) {
-               long ret = bindings.NetGraphMsgHandler_from_net_graph(chain_access == null ? 0 : chain_access.ptr, logger == null ? 0 : logger.ptr, bindings.NetworkGraph_new(network_graph_genesis_hash));
+       public static NetGraphMsgHandler constructor_from_net_graph(Access chain_access, Logger logger, NetworkGraph network_graph) {
+               long ret = bindings.NetGraphMsgHandler_from_net_graph(chain_access == null ? 0 : chain_access.ptr, logger == null ? 0 : logger.ptr, network_graph == null ? 0 : network_graph.ptr & ~1);
                NetGraphMsgHandler ret_hu_conv = new NetGraphMsgHandler(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(chain_access);
                ret_hu_conv.ptrs_to.add(logger);
+               ret_hu_conv.ptrs_to.add(network_graph);
                return ret_hu_conv;
        }
 
+       public void add_chain_access(Access chain_access) {
+               bindings.NetGraphMsgHandler_add_chain_access(this.ptr, chain_access == null ? 0 : chain_access.ptr);
+               this.ptrs_to.add(chain_access);
+       }
+
        public LockedNetworkGraph read_locked_graph() {
                long ret = bindings.NetGraphMsgHandler_read_locked_graph(this.ptr);
                LockedNetworkGraph ret_hu_conv = new LockedNetworkGraph(null, ret);
index 9ed88b6d86e2dec3910a7af9eb11dadfc97a6888..b8badcc5c149c8b043de7baa55cc1f75a8e6a717 100644 (file)
@@ -14,6 +14,13 @@ public class NetworkGraph extends CommonBase {
                if (ptr != 0) { bindings.NetworkGraph_free(ptr); }
        }
 
+       public NetworkGraph clone() {
+               long ret = bindings.NetworkGraph_clone(this.ptr);
+               NetworkGraph ret_hu_conv = new NetworkGraph(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.NetworkGraph_write(this.ptr);
                return ret;
index 26cdd5821d8df4ea04ad86dec33b226d21919154..2b83385cd1f5d1b9840c94644ba9c1cc26c652f0 100644 (file)
@@ -14,13 +14,6 @@ public class NodeAnnouncement extends CommonBase {
                if (ptr != 0) { bindings.NodeAnnouncement_free(ptr); }
        }
 
-       public NodeAnnouncement clone() {
-               long ret = bindings.NodeAnnouncement_clone(this.ptr);
-               NodeAnnouncement ret_hu_conv = new NodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_signature() {
                byte[] ret = bindings.NodeAnnouncement_get_signature(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ public class NodeAnnouncement extends CommonBase {
                return ret_hu_conv;
        }
 
+       public NodeAnnouncement clone() {
+               long ret = bindings.NodeAnnouncement_clone(this.ptr);
+               NodeAnnouncement ret_hu_conv = new NodeAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.NodeAnnouncement_write(this.ptr);
                return ret;
        }
 
-       public static NodeAnnouncement constructor_read(byte[] ser) {
+       public static Result_NodeAnnouncementDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.NodeAnnouncement_read(ser);
-               NodeAnnouncement ret_hu_conv = new NodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index f59c055ef35d2b6a8382a148fec2a0f6f96c727b..561b4dd386243ca56e48be946922c38837487e00 100644 (file)
@@ -14,13 +14,6 @@ public class NodeAnnouncementInfo extends CommonBase {
                if (ptr != 0) { bindings.NodeAnnouncementInfo_free(ptr); }
        }
 
-       public NodeAnnouncementInfo clone() {
-               long ret = bindings.NodeAnnouncementInfo_clone(this.ptr);
-               NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public NodeFeatures get_features() {
                long ret = bindings.NodeAnnouncementInfo_get_features(this.ptr);
                NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
@@ -31,14 +24,6 @@ public class NodeAnnouncementInfo extends CommonBase {
        public void set_features(NodeFeatures val) {
                bindings.NodeAnnouncementInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public int get_last_update() {
@@ -69,7 +54,7 @@ public class NodeAnnouncementInfo extends CommonBase {
        }
 
        public void set_addresses(NetAddress[] val) {
-               bindings.NodeAnnouncementInfo_set_addresses(this.ptr, Arrays.stream(val).mapToLong(arr_conv_12 -> arr_conv_12.ptr).toArray());
+               bindings.NodeAnnouncementInfo_set_addresses(this.ptr, Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12.ptr).toArray());
                /* TODO 2 NetAddress  */;
        }
 
@@ -86,23 +71,22 @@ public class NodeAnnouncementInfo extends CommonBase {
        }
 
        public static NodeAnnouncementInfo constructor_new(NodeFeatures features_arg, int last_update_arg, byte[] rgb_arg, byte[] alias_arg, NetAddress[] addresses_arg, NodeAnnouncement announcement_message_arg) {
-               long ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, last_update_arg, rgb_arg, alias_arg, Arrays.stream(addresses_arg).mapToLong(arr_conv_12 -> arr_conv_12.ptr).toArray(), announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
+               long ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, last_update_arg, rgb_arg, alias_arg, Arrays.stream(addresses_arg).mapToLong(addresses_arg_conv_12 -> addresses_arg_conv_12.ptr).toArray(), announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
                NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(features_arg);
-               // 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, features_arg is reset to null and is now a dummy object.
-               features_arg.ptr = 0;
                /* TODO 2 NetAddress  */;
                ret_hu_conv.ptrs_to.add(announcement_message_arg);
                return ret_hu_conv;
        }
 
+       public NodeAnnouncementInfo clone() {
+               long ret = bindings.NodeAnnouncementInfo_clone(this.ptr);
+               NodeAnnouncementInfo ret_hu_conv = new NodeAnnouncementInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.NodeAnnouncementInfo_write(this.ptr);
                return ret;
index d1dfb5b4640b7f9c189bd18e2b42463c0b596054..a32f9680c0fdb4dd970c27fefc335321df1c19de 100644 (file)
@@ -14,4 +14,36 @@ public class NodeFeatures extends CommonBase {
                if (ptr != 0) { bindings.NodeFeatures_free(ptr); }
        }
 
+       public NodeFeatures clone() {
+               long ret = bindings.NodeFeatures_clone(this.ptr);
+               NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static NodeFeatures constructor_empty() {
+               long ret = bindings.NodeFeatures_empty();
+               NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static NodeFeatures constructor_known() {
+               long ret = bindings.NodeFeatures_known();
+               NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public byte[] write() {
+               byte[] ret = bindings.NodeFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_NodeFeaturesDecodeErrorZ constructor_read(byte[] ser) {
+               long ret = bindings.NodeFeatures_read(ser);
+               Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index ba19c79b125763024e397d969758049d143fe4af..8b9837398d36a2f49bbfb685bf011357ebe09321 100644 (file)
@@ -14,13 +14,6 @@ public class NodeInfo extends CommonBase {
                if (ptr != 0) { bindings.NodeInfo_free(ptr); }
        }
 
-       public NodeInfo clone() {
-               long ret = bindings.NodeInfo_clone(this.ptr);
-               NodeInfo ret_hu_conv = new NodeInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_channels(long[] val) {
                bindings.NodeInfo_set_channels(this.ptr, val);
        }
@@ -58,6 +51,13 @@ public class NodeInfo extends CommonBase {
                return ret_hu_conv;
        }
 
+       public NodeInfo clone() {
+               long ret = bindings.NodeInfo_clone(this.ptr);
+               NodeInfo ret_hu_conv = new NodeInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.NodeInfo_write(this.ptr);
                return ret;
index 2de4e031a009fd996e3eb089be29ca21337609f2..3f2c419071576cb730349f05d4f6d4c0b8c875af 100644 (file)
@@ -14,13 +14,6 @@ public class OpenChannel extends CommonBase {
                if (ptr != 0) { bindings.OpenChannel_free(ptr); }
        }
 
-       public OpenChannel clone() {
-               long ret = bindings.OpenChannel_clone(this.ptr);
-               OpenChannel ret_hu_conv = new OpenChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.OpenChannel_get_chain_hash(this.ptr);
                return ret;
@@ -183,15 +176,21 @@ public class OpenChannel extends CommonBase {
                bindings.OpenChannel_set_channel_flags(this.ptr, val);
        }
 
+       public OpenChannel clone() {
+               long ret = bindings.OpenChannel_clone(this.ptr);
+               OpenChannel ret_hu_conv = new OpenChannel(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.OpenChannel_write(this.ptr);
                return ret;
        }
 
-       public static OpenChannel constructor_read(byte[] ser) {
+       public static Result_OpenChannelDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.OpenChannel_read(ser);
-               OpenChannel ret_hu_conv = new OpenChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index edc0a7f3c0a99a12e23d58a2e0ad5feec713ec06..d0c7edba75ad06e959af96172d93291a5b5140c8 100644 (file)
@@ -14,13 +14,6 @@ public class OutPoint extends CommonBase {
                if (ptr != 0) { bindings.OutPoint_free(ptr); }
        }
 
-       public OutPoint clone() {
-               long ret = bindings.OutPoint_clone(this.ptr);
-               OutPoint ret_hu_conv = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_txid() {
                byte[] ret = bindings.OutPoint_get_txid(this.ptr);
                return ret;
@@ -46,6 +39,13 @@ public class OutPoint extends CommonBase {
                return ret_hu_conv;
        }
 
+       public OutPoint clone() {
+               long ret = bindings.OutPoint_clone(this.ptr);
+               OutPoint ret_hu_conv = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] to_channel_id() {
                byte[] ret = bindings.OutPoint_to_channel_id(this.ptr);
                return ret;
@@ -56,10 +56,9 @@ public class OutPoint extends CommonBase {
                return ret;
        }
 
-       public static OutPoint constructor_read(byte[] ser) {
+       public static Result_OutPointDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.OutPoint_read(ser);
-               OutPoint ret_hu_conv = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 48fd7a02a4faa9eec37adc2c24e49b4302354d21..af08d8cccfa042ed4e8976e3344095d339055e58 100644 (file)
@@ -7,18 +7,47 @@ import java.util.Arrays;
 
 @SuppressWarnings("unchecked") // We correctly assign various generic arrays
 public class PaymentSendFailure extends CommonBase {
-       PaymentSendFailure(Object _dummy, long ptr) { super(ptr); }
+       private PaymentSendFailure(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
                super.finalize();
                if (ptr != 0) { bindings.PaymentSendFailure_free(ptr); }
        }
-
-       public PaymentSendFailure clone() {
-               long ret = bindings.PaymentSendFailure_clone(this.ptr);
-               PaymentSendFailure ret_hu_conv = new PaymentSendFailure(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
+       static PaymentSendFailure constr_from_ptr(long ptr) {
+               bindings.LDKPaymentSendFailure raw_val = bindings.LDKPaymentSendFailure_ref_from_ptr(ptr);
+               if (raw_val.getClass() == bindings.LDKPaymentSendFailure.ParameterError.class) {
+                       return new ParameterError(ptr, (bindings.LDKPaymentSendFailure.ParameterError)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKPaymentSendFailure.PathParameterError.class) {
+                       return new PathParameterError(ptr, (bindings.LDKPaymentSendFailure.PathParameterError)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKPaymentSendFailure.AllFailedRetrySafe.class) {
+                       return new AllFailedRetrySafe(ptr, (bindings.LDKPaymentSendFailure.AllFailedRetrySafe)raw_val);
+               }
+               if (raw_val.getClass() == bindings.LDKPaymentSendFailure.PartialFailure.class) {
+                       return new PartialFailure(ptr, (bindings.LDKPaymentSendFailure.PartialFailure)raw_val);
+               }
+               assert false; return null; // Unreachable without extending the (internal) bindings interface
        }
 
+       public final static class ParameterError extends PaymentSendFailure {
+               private ParameterError(long ptr, bindings.LDKPaymentSendFailure.ParameterError obj) {
+                       super(null, ptr);
+               }
+       }
+       public final static class PathParameterError extends PaymentSendFailure {
+               private PathParameterError(long ptr, bindings.LDKPaymentSendFailure.PathParameterError obj) {
+                       super(null, ptr);
+               }
+       }
+       public final static class AllFailedRetrySafe extends PaymentSendFailure {
+               private AllFailedRetrySafe(long ptr, bindings.LDKPaymentSendFailure.AllFailedRetrySafe obj) {
+                       super(null, ptr);
+               }
+       }
+       public final static class PartialFailure extends PaymentSendFailure {
+               private PartialFailure(long ptr, bindings.LDKPaymentSendFailure.PartialFailure obj) {
+                       super(null, ptr);
+               }
+       }
 }
index b24730289942c82b409ec7f46ff61236e2c612fa..0bd7604dc37cb2bca6ffa0c241aa2fbb1b7991be 100644 (file)
@@ -14,13 +14,6 @@ public class PeerHandleError extends CommonBase {
                if (ptr != 0) { bindings.PeerHandleError_free(ptr); }
        }
 
-       public PeerHandleError clone() {
-               long ret = bindings.PeerHandleError_clone(this.ptr);
-               PeerHandleError ret_hu_conv = new PeerHandleError(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public boolean get_no_connection_possible() {
                boolean ret = bindings.PeerHandleError_get_no_connection_possible(this.ptr);
                return ret;
@@ -37,4 +30,11 @@ public class PeerHandleError extends CommonBase {
                return ret_hu_conv;
        }
 
+       public PeerHandleError clone() {
+               long ret = bindings.PeerHandleError_clone(this.ptr);
+               PeerHandleError ret_hu_conv = new PeerHandleError(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 72815630a7af57f4964d7033f6b47077fc3c6c2e..0f466fa9e2ea6af3b0e2704e6fb9fddb4afdcad1 100644 (file)
@@ -14,13 +14,6 @@ public class Ping extends CommonBase {
                if (ptr != 0) { bindings.Ping_free(ptr); }
        }
 
-       public Ping clone() {
-               long ret = bindings.Ping_clone(this.ptr);
-               Ping ret_hu_conv = new Ping(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public short get_ponglen() {
                short ret = bindings.Ping_get_ponglen(this.ptr);
                return ret;
@@ -46,6 +39,13 @@ public class Ping extends CommonBase {
                return ret_hu_conv;
        }
 
+       public Ping clone() {
+               long ret = bindings.Ping_clone(this.ptr);
+               Ping ret_hu_conv = new Ping(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.Ping_write(this.ptr);
                return ret;
index ef636e284961a5c9b7684ddc069c2661061b615e..80530aa7d5342ffc9bd25e2c4b499d588ab17acd 100644 (file)
@@ -14,13 +14,6 @@ public class Pong extends CommonBase {
                if (ptr != 0) { bindings.Pong_free(ptr); }
        }
 
-       public Pong clone() {
-               long ret = bindings.Pong_clone(this.ptr);
-               Pong ret_hu_conv = new Pong(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public short get_byteslen() {
                short ret = bindings.Pong_get_byteslen(this.ptr);
                return ret;
@@ -37,6 +30,13 @@ public class Pong extends CommonBase {
                return ret_hu_conv;
        }
 
+       public Pong clone() {
+               long ret = bindings.Pong_clone(this.ptr);
+               Pong ret_hu_conv = new Pong(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.Pong_write(this.ptr);
                return ret;
index acacd0537b4ce2980ae47fb86d682d80c93b07ed..2f6f3a12c72b2edcfeee3ad7385dd9bf4d5fcf16 100644 (file)
@@ -14,13 +14,6 @@ public class QueryChannelRange extends CommonBase {
                if (ptr != 0) { bindings.QueryChannelRange_free(ptr); }
        }
 
-       public QueryChannelRange clone() {
-               long ret = bindings.QueryChannelRange_clone(this.ptr);
-               QueryChannelRange ret_hu_conv = new QueryChannelRange(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.QueryChannelRange_get_chain_hash(this.ptr);
                return ret;
@@ -55,6 +48,13 @@ public class QueryChannelRange extends CommonBase {
                return ret_hu_conv;
        }
 
+       public QueryChannelRange clone() {
+               long ret = bindings.QueryChannelRange_clone(this.ptr);
+               QueryChannelRange ret_hu_conv = new QueryChannelRange(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_QueryChannelRangeDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.QueryChannelRange_read(ser);
                Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
index 2c9f57d7569d271ec4587ab7f32fc72484a16ad4..069bc72d43fb6c54ae21ece1ba6e3f9c9910e774 100644 (file)
@@ -14,13 +14,6 @@ public class QueryShortChannelIds extends CommonBase {
                if (ptr != 0) { bindings.QueryShortChannelIds_free(ptr); }
        }
 
-       public QueryShortChannelIds clone() {
-               long ret = bindings.QueryShortChannelIds_clone(this.ptr);
-               QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.QueryShortChannelIds_get_chain_hash(this.ptr);
                return ret;
@@ -41,6 +34,13 @@ public class QueryShortChannelIds extends CommonBase {
                return ret_hu_conv;
        }
 
+       public QueryShortChannelIds clone() {
+               long ret = bindings.QueryShortChannelIds_clone(this.ptr);
+               QueryShortChannelIds ret_hu_conv = new QueryShortChannelIds(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_QueryShortChannelIdsDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.QueryShortChannelIds_read(ser);
                Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
index ca7243da6d12c8dc9b79060a09563fbcc1d9cabd..21934785eff96df486b0eb406b41f4fe5a1466d6 100644 (file)
@@ -14,13 +14,6 @@ public class ReplyChannelRange extends CommonBase {
                if (ptr != 0) { bindings.ReplyChannelRange_free(ptr); }
        }
 
-       public ReplyChannelRange clone() {
-               long ret = bindings.ReplyChannelRange_clone(this.ptr);
-               ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.ReplyChannelRange_get_chain_hash(this.ptr);
                return ret;
@@ -48,26 +41,33 @@ public class ReplyChannelRange extends CommonBase {
                bindings.ReplyChannelRange_set_number_of_blocks(this.ptr, val);
        }
 
-       public boolean get_full_information() {
-               boolean ret = bindings.ReplyChannelRange_get_full_information(this.ptr);
+       public boolean get_sync_complete() {
+               boolean ret = bindings.ReplyChannelRange_get_sync_complete(this.ptr);
                return ret;
        }
 
-       public void set_full_information(boolean val) {
-               bindings.ReplyChannelRange_set_full_information(this.ptr, val);
+       public void set_sync_complete(boolean val) {
+               bindings.ReplyChannelRange_set_sync_complete(this.ptr, val);
        }
 
        public void set_short_channel_ids(long[] val) {
                bindings.ReplyChannelRange_set_short_channel_ids(this.ptr, val);
        }
 
-       public static ReplyChannelRange constructor_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean full_information_arg, long[] short_channel_ids_arg) {
-               long ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg);
+       public static ReplyChannelRange constructor_new(byte[] chain_hash_arg, int first_blocknum_arg, int number_of_blocks_arg, boolean sync_complete_arg, long[] short_channel_ids_arg) {
+               long ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
                ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
+       public ReplyChannelRange clone() {
+               long ret = bindings.ReplyChannelRange_clone(this.ptr);
+               ReplyChannelRange ret_hu_conv = new ReplyChannelRange(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_ReplyChannelRangeDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ReplyChannelRange_read(ser);
                Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
index a558d5c90a042a6083149ce3ca4888d69d10aa61..26098810881c2db4b5d1058aca84eed71da1d12a 100644 (file)
@@ -14,13 +14,6 @@ public class ReplyShortChannelIdsEnd extends CommonBase {
                if (ptr != 0) { bindings.ReplyShortChannelIdsEnd_free(ptr); }
        }
 
-       public ReplyShortChannelIdsEnd clone() {
-               long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
-               ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this.ptr);
                return ret;
@@ -46,6 +39,13 @@ public class ReplyShortChannelIdsEnd extends CommonBase {
                return ret_hu_conv;
        }
 
+       public ReplyShortChannelIdsEnd clone() {
+               long ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
+               ReplyShortChannelIdsEnd ret_hu_conv = new ReplyShortChannelIdsEnd(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.ReplyShortChannelIdsEnd_read(ser);
                Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
diff --git a/src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_AcceptChannelDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..b1ade8b
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
+       private Result_AcceptChannelDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_AcceptChannelDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_AcceptChannelDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_AcceptChannelDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_AcceptChannelDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_AcceptChannelDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_AcceptChannelDecodeErrorZ_OK extends Result_AcceptChannelDecodeErrorZ {
+               public final AcceptChannel res;
+               private Result_AcceptChannelDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_AcceptChannelDecodeErrorZ_get_ok(ptr);
+                       AcceptChannel res_hu_conv = new AcceptChannel(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_AcceptChannelDecodeErrorZ_OK(AcceptChannel res) {
+                       this(null, bindings.CResult_AcceptChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_AcceptChannelDecodeErrorZ_Err extends Result_AcceptChannelDecodeErrorZ {
+               public final DecodeError err;
+               private Result_AcceptChannelDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_AcceptChannelDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_AcceptChannelDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_AcceptChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_AnnouncementSignaturesDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..4eb9142
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
+       private Result_AnnouncementSignaturesDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_AnnouncementSignaturesDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_AnnouncementSignaturesDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_AnnouncementSignaturesDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_AnnouncementSignaturesDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_AnnouncementSignaturesDecodeErrorZ_OK extends Result_AnnouncementSignaturesDecodeErrorZ {
+               public final AnnouncementSignatures res;
+               private Result_AnnouncementSignaturesDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(ptr);
+                       AnnouncementSignatures res_hu_conv = new AnnouncementSignatures(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_AnnouncementSignaturesDecodeErrorZ_OK(AnnouncementSignatures res) {
+                       this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_AnnouncementSignaturesDecodeErrorZ_Err extends Result_AnnouncementSignaturesDecodeErrorZ {
+               public final DecodeError err;
+               private Result_AnnouncementSignaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_AnnouncementSignaturesDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..ad631f5
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
+       private Result_BuiltCommitmentTransactionDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_BuiltCommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_BuiltCommitmentTransactionDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_BuiltCommitmentTransactionDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_BuiltCommitmentTransactionDecodeErrorZ_OK extends Result_BuiltCommitmentTransactionDecodeErrorZ {
+               public final BuiltCommitmentTransaction res;
+               private Result_BuiltCommitmentTransactionDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(ptr);
+                       BuiltCommitmentTransaction res_hu_conv = new BuiltCommitmentTransaction(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_BuiltCommitmentTransactionDecodeErrorZ_OK(BuiltCommitmentTransaction res) {
+                       this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_BuiltCommitmentTransactionDecodeErrorZ_Err extends Result_BuiltCommitmentTransactionDecodeErrorZ {
+               public final DecodeError err;
+               private Result_BuiltCommitmentTransactionDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_BuiltCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_CVec_CVec_u8ZZNoneZ.java b/src/main/java/org/ldk/structs/Result_CVec_CVec_u8ZZNoneZ.java
new file mode 100644 (file)
index 0000000..8667abc
--- /dev/null
@@ -0,0 +1,41 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_CVec_CVec_u8ZZNoneZ extends CommonBase {
+       private Result_CVec_CVec_u8ZZNoneZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_CVec_CVec_u8ZZNoneZ_free(ptr); } super.finalize();
+       }
+
+       static Result_CVec_CVec_u8ZZNoneZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(ptr)) {
+                       return new Result_CVec_CVec_u8ZZNoneZ_OK(null, ptr);
+               } else {
+                       return new Result_CVec_CVec_u8ZZNoneZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_CVec_CVec_u8ZZNoneZ_OK extends Result_CVec_CVec_u8ZZNoneZ {
+               public final byte[][] res;
+               private Result_CVec_CVec_u8ZZNoneZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.res = bindings.LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(ptr);
+               }
+               public Result_CVec_CVec_u8ZZNoneZ_OK(byte[][] res) {
+                       this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(res));
+               }
+       }
+
+       public static final class Result_CVec_CVec_u8ZZNoneZ_Err extends Result_CVec_CVec_u8ZZNoneZ {
+               private Result_CVec_CVec_u8ZZNoneZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+               }
+               public Result_CVec_CVec_u8ZZNoneZ_Err() {
+                       this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_err());
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_ChanKeySignerDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChanKeySignerDecodeErrorZ.java
deleted file mode 100644 (file)
index 6b401df..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class Result_ChanKeySignerDecodeErrorZ extends CommonBase {
-       private Result_ChanKeySignerDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_ChanKeySignerDecodeErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_ChanKeySignerDecodeErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(ptr)) {
-                       return new Result_ChanKeySignerDecodeErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_ChanKeySignerDecodeErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_ChanKeySignerDecodeErrorZ_OK extends Result_ChanKeySignerDecodeErrorZ {
-               public final ChannelKeys res;
-               private Result_ChanKeySignerDecodeErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       long res = bindings.LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(ptr);
-                       ChannelKeys ret_hu_conv = new ChannelKeys(null, res);
-                       ret_hu_conv.ptrs_to.add(this);
-                       this.res = ret_hu_conv;
-               }
-               public Result_ChanKeySignerDecodeErrorZ_OK(ChannelKeys res) {
-                       this(null, bindings.CResult_ChanKeySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr));
-                       this.ptrs_to.add(res);
-               }
-       }
-
-       public static final class Result_ChanKeySignerDecodeErrorZ_Err extends Result_ChanKeySignerDecodeErrorZ {
-               public final DecodeError err;
-               private Result_ChanKeySignerDecodeErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       long err = bindings.LDKCResult_ChanKeySignerDecodeErrorZ_get_err(ptr);
-                       DecodeError err_hu_conv = new DecodeError(null, err);
-                       err_hu_conv.ptrs_to.add(this);
-                       this.err = err_hu_conv;
-               }
-               public Result_ChanKeySignerDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChanKeySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
-       }
-}
diff --git a/src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelAnnouncementDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..d0dd49e
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
+       private Result_ChannelAnnouncementDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelAnnouncementDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelAnnouncementDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelAnnouncementDecodeErrorZ_OK extends Result_ChannelAnnouncementDecodeErrorZ {
+               public final ChannelAnnouncement res;
+               private Result_ChannelAnnouncementDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(ptr);
+                       ChannelAnnouncement res_hu_conv = new ChannelAnnouncement(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelAnnouncementDecodeErrorZ_OK(ChannelAnnouncement res) {
+                       this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelAnnouncementDecodeErrorZ_Err extends Result_ChannelAnnouncementDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelAnnouncementDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelAnnouncementDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelConfigDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..f58e2d1
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
+       private Result_ChannelConfigDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelConfigDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelConfigDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelConfigDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelConfigDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelConfigDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelConfigDecodeErrorZ_OK extends Result_ChannelConfigDecodeErrorZ {
+               public final ChannelConfig res;
+               private Result_ChannelConfigDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_ChannelConfigDecodeErrorZ_get_ok(ptr);
+                       ChannelConfig res_hu_conv = new ChannelConfig(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelConfigDecodeErrorZ_OK(ChannelConfig res) {
+                       this(null, bindings.CResult_ChannelConfigDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelConfigDecodeErrorZ_Err extends Result_ChannelConfigDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelConfigDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_ChannelConfigDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelConfigDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelConfigDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelFeaturesDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..e804221
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
+       private Result_ChannelFeaturesDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelFeaturesDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelFeaturesDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelFeaturesDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelFeaturesDecodeErrorZ_OK extends Result_ChannelFeaturesDecodeErrorZ {
+               public final ChannelFeatures res;
+               private Result_ChannelFeaturesDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(ptr);
+                       ChannelFeatures res_hu_conv = new ChannelFeatures(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelFeaturesDecodeErrorZ_OK(ChannelFeatures res) {
+                       this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelFeaturesDecodeErrorZ_Err extends Result_ChannelFeaturesDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelFeaturesDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelInfoDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..ca7a8b3
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
+       private Result_ChannelInfoDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelInfoDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelInfoDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelInfoDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelInfoDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelInfoDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelInfoDecodeErrorZ_OK extends Result_ChannelInfoDecodeErrorZ {
+               public final ChannelInfo res;
+               private Result_ChannelInfoDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_ChannelInfoDecodeErrorZ_get_ok(ptr);
+                       ChannelInfo res_hu_conv = new ChannelInfo(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelInfoDecodeErrorZ_OK(ChannelInfo res) {
+                       this(null, bindings.CResult_ChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelInfoDecodeErrorZ_Err extends Result_ChannelInfoDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelInfoDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_ChannelInfoDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelInfoDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelPublicKeysDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..3093a78
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
+       private Result_ChannelPublicKeysDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelPublicKeysDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelPublicKeysDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelPublicKeysDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelPublicKeysDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelPublicKeysDecodeErrorZ_OK extends Result_ChannelPublicKeysDecodeErrorZ {
+               public final ChannelPublicKeys res;
+               private Result_ChannelPublicKeysDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(ptr);
+                       ChannelPublicKeys res_hu_conv = new ChannelPublicKeys(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelPublicKeysDecodeErrorZ_OK(ChannelPublicKeys res) {
+                       this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelPublicKeysDecodeErrorZ_Err extends Result_ChannelPublicKeysDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelPublicKeysDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelPublicKeysDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelTransactionParametersDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..49ba747
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase {
+       private Result_ChannelTransactionParametersDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelTransactionParametersDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelTransactionParametersDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelTransactionParametersDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelTransactionParametersDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelTransactionParametersDecodeErrorZ_OK extends Result_ChannelTransactionParametersDecodeErrorZ {
+               public final ChannelTransactionParameters res;
+               private Result_ChannelTransactionParametersDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(ptr);
+                       ChannelTransactionParameters res_hu_conv = new ChannelTransactionParameters(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelTransactionParametersDecodeErrorZ_OK(ChannelTransactionParameters res) {
+                       this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelTransactionParametersDecodeErrorZ_Err extends Result_ChannelTransactionParametersDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelTransactionParametersDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ChannelUpdateDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..7609cea
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
+       private Result_ChannelUpdateDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelUpdateDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelUpdateDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelUpdateDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelUpdateDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelUpdateDecodeErrorZ_OK extends Result_ChannelUpdateDecodeErrorZ {
+               public final ChannelUpdate res;
+               private Result_ChannelUpdateDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(ptr);
+                       ChannelUpdate res_hu_conv = new ChannelUpdate(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelUpdateDecodeErrorZ_OK(ChannelUpdate res) {
+                       this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelUpdateDecodeErrorZ_Err extends Result_ChannelUpdateDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelUpdateDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_ChannelUpdateDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelUpdateDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ClosingSignedDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..b02b692
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
+       private Result_ClosingSignedDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ClosingSignedDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ClosingSignedDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ClosingSignedDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ClosingSignedDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ClosingSignedDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ClosingSignedDecodeErrorZ_OK extends Result_ClosingSignedDecodeErrorZ {
+               public final ClosingSigned res;
+               private Result_ClosingSignedDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_ClosingSignedDecodeErrorZ_get_ok(ptr);
+                       ClosingSigned res_hu_conv = new ClosingSigned(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ClosingSignedDecodeErrorZ_OK(ClosingSigned res) {
+                       this(null, bindings.CResult_ClosingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ClosingSignedDecodeErrorZ_Err extends Result_ClosingSignedDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ClosingSignedDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_ClosingSignedDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ClosingSignedDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ClosingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CommitmentSignedDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..da17497
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
+       private Result_CommitmentSignedDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_CommitmentSignedDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_CommitmentSignedDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_CommitmentSignedDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_CommitmentSignedDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_CommitmentSignedDecodeErrorZ_OK extends Result_CommitmentSignedDecodeErrorZ {
+               public final CommitmentSigned res;
+               private Result_CommitmentSignedDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(ptr);
+                       CommitmentSigned res_hu_conv = new CommitmentSigned(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_CommitmentSignedDecodeErrorZ_OK(CommitmentSigned res) {
+                       this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_CommitmentSignedDecodeErrorZ_Err extends Result_CommitmentSignedDecodeErrorZ {
+               public final DecodeError err;
+               private Result_CommitmentSignedDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_CommitmentSignedDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_CommitmentSignedDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CommitmentTransactionDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..43d4745
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
+       private Result_CommitmentTransactionDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_CommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_CommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_CommitmentTransactionDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_CommitmentTransactionDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_CommitmentTransactionDecodeErrorZ_OK extends Result_CommitmentTransactionDecodeErrorZ {
+               public final CommitmentTransaction res;
+               private Result_CommitmentTransactionDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(ptr);
+                       CommitmentTransaction res_hu_conv = new CommitmentTransaction(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_CommitmentTransactionDecodeErrorZ_OK(CommitmentTransaction res) {
+                       this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_CommitmentTransactionDecodeErrorZ_Err extends Result_CommitmentTransactionDecodeErrorZ {
+               public final DecodeError err;
+               private Result_CommitmentTransactionDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_CommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..aa3bc8e
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends CommonBase {
+       private Result_CounterpartyChannelTransactionParametersDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK extends Result_CounterpartyChannelTransactionParametersDecodeErrorZ {
+               public final CounterpartyChannelTransactionParameters res;
+               private Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(ptr);
+                       CounterpartyChannelTransactionParameters res_hu_conv = new CounterpartyChannelTransactionParameters(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(CounterpartyChannelTransactionParameters res) {
+                       this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err extends Result_CounterpartyChannelTransactionParametersDecodeErrorZ {
+               public final DecodeError err;
+               private Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_DirectionalChannelInfoDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_DirectionalChannelInfoDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..ae050e8
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_DirectionalChannelInfoDecodeErrorZ extends CommonBase {
+       private Result_DirectionalChannelInfoDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_DirectionalChannelInfoDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_DirectionalChannelInfoDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_DirectionalChannelInfoDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_DirectionalChannelInfoDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_DirectionalChannelInfoDecodeErrorZ_OK extends Result_DirectionalChannelInfoDecodeErrorZ {
+               public final DirectionalChannelInfo res;
+               private Result_DirectionalChannelInfoDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(ptr);
+                       DirectionalChannelInfo res_hu_conv = new DirectionalChannelInfo(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_DirectionalChannelInfoDecodeErrorZ_OK(DirectionalChannelInfo res) {
+                       this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_DirectionalChannelInfoDecodeErrorZ_Err extends Result_DirectionalChannelInfoDecodeErrorZ {
+               public final DecodeError err;
+               private Result_DirectionalChannelInfoDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_DirectionalChannelInfoDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_FundingCreatedDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..026c7f1
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
+       private Result_FundingCreatedDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_FundingCreatedDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_FundingCreatedDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_FundingCreatedDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_FundingCreatedDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_FundingCreatedDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_FundingCreatedDecodeErrorZ_OK extends Result_FundingCreatedDecodeErrorZ {
+               public final FundingCreated res;
+               private Result_FundingCreatedDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_FundingCreatedDecodeErrorZ_get_ok(ptr);
+                       FundingCreated res_hu_conv = new FundingCreated(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_FundingCreatedDecodeErrorZ_OK(FundingCreated res) {
+                       this(null, bindings.CResult_FundingCreatedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_FundingCreatedDecodeErrorZ_Err extends Result_FundingCreatedDecodeErrorZ {
+               public final DecodeError err;
+               private Result_FundingCreatedDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_FundingCreatedDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_FundingCreatedDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_FundingCreatedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_FundingLockedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_FundingLockedDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..c43294a
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_FundingLockedDecodeErrorZ extends CommonBase {
+       private Result_FundingLockedDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_FundingLockedDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_FundingLockedDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_FundingLockedDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_FundingLockedDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_FundingLockedDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_FundingLockedDecodeErrorZ_OK extends Result_FundingLockedDecodeErrorZ {
+               public final FundingLocked res;
+               private Result_FundingLockedDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_FundingLockedDecodeErrorZ_get_ok(ptr);
+                       FundingLocked res_hu_conv = new FundingLocked(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_FundingLockedDecodeErrorZ_OK(FundingLocked res) {
+                       this(null, bindings.CResult_FundingLockedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_FundingLockedDecodeErrorZ_Err extends Result_FundingLockedDecodeErrorZ {
+               public final DecodeError err;
+               private Result_FundingLockedDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_FundingLockedDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_FundingLockedDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_FundingLockedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_FundingSignedDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..aaa7de2
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_FundingSignedDecodeErrorZ extends CommonBase {
+       private Result_FundingSignedDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_FundingSignedDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_FundingSignedDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_FundingSignedDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_FundingSignedDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_FundingSignedDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_FundingSignedDecodeErrorZ_OK extends Result_FundingSignedDecodeErrorZ {
+               public final FundingSigned res;
+               private Result_FundingSignedDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_FundingSignedDecodeErrorZ_get_ok(ptr);
+                       FundingSigned res_hu_conv = new FundingSigned(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_FundingSignedDecodeErrorZ_OK(FundingSigned res) {
+                       this(null, bindings.CResult_FundingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_FundingSignedDecodeErrorZ_Err extends Result_FundingSignedDecodeErrorZ {
+               public final DecodeError err;
+               private Result_FundingSignedDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_FundingSignedDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_FundingSignedDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_FundingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..b9a23fb
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
+       private Result_HTLCOutputInCommitmentDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_HTLCOutputInCommitmentDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_HTLCOutputInCommitmentDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_HTLCOutputInCommitmentDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_HTLCOutputInCommitmentDecodeErrorZ_OK extends Result_HTLCOutputInCommitmentDecodeErrorZ {
+               public final HTLCOutputInCommitment res;
+               private Result_HTLCOutputInCommitmentDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(ptr);
+                       HTLCOutputInCommitment res_hu_conv = new HTLCOutputInCommitment(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_HTLCOutputInCommitmentDecodeErrorZ_OK(HTLCOutputInCommitment res) {
+                       this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_HTLCOutputInCommitmentDecodeErrorZ_Err extends Result_HTLCOutputInCommitmentDecodeErrorZ {
+               public final DecodeError err;
+               private Result_HTLCOutputInCommitmentDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_HTLCOutputInCommitmentDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HTLCUpdateDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..73b3d20
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
+       private Result_HTLCUpdateDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_HTLCUpdateDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_HTLCUpdateDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_HTLCUpdateDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_HTLCUpdateDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_HTLCUpdateDecodeErrorZ_OK extends Result_HTLCUpdateDecodeErrorZ {
+               public final HTLCUpdate res;
+               private Result_HTLCUpdateDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(ptr);
+                       HTLCUpdate res_hu_conv = new HTLCUpdate(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_HTLCUpdateDecodeErrorZ_OK(HTLCUpdate res) {
+                       this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_HTLCUpdateDecodeErrorZ_Err extends Result_HTLCUpdateDecodeErrorZ {
+               public final DecodeError err;
+               private Result_HTLCUpdateDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_HTLCUpdateDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_HTLCUpdateDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_HolderCommitmentTransactionDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..1aefd3d
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
+       private Result_HolderCommitmentTransactionDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_HolderCommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_HolderCommitmentTransactionDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_HolderCommitmentTransactionDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_HolderCommitmentTransactionDecodeErrorZ_OK extends Result_HolderCommitmentTransactionDecodeErrorZ {
+               public final HolderCommitmentTransaction res;
+               private Result_HolderCommitmentTransactionDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(ptr);
+                       HolderCommitmentTransaction res_hu_conv = new HolderCommitmentTransaction(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_HolderCommitmentTransactionDecodeErrorZ_OK(HolderCommitmentTransaction res) {
+                       this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_HolderCommitmentTransactionDecodeErrorZ_Err extends Result_HolderCommitmentTransactionDecodeErrorZ {
+               public final DecodeError err;
+               private Result_HolderCommitmentTransactionDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_HolderCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_InMemoryChannelKeysDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InMemoryChannelKeysDecodeErrorZ.java
deleted file mode 100644 (file)
index a47ae76..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class Result_InMemoryChannelKeysDecodeErrorZ extends CommonBase {
-       private Result_InMemoryChannelKeysDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_InMemoryChannelKeysDecodeErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_InMemoryChannelKeysDecodeErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(ptr)) {
-                       return new Result_InMemoryChannelKeysDecodeErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_InMemoryChannelKeysDecodeErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_InMemoryChannelKeysDecodeErrorZ_OK extends Result_InMemoryChannelKeysDecodeErrorZ {
-               public final InMemoryChannelKeys res;
-               private Result_InMemoryChannelKeysDecodeErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       long res = bindings.LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(ptr);
-                       InMemoryChannelKeys res_hu_conv = new InMemoryChannelKeys(null, res);
-                       res_hu_conv.ptrs_to.add(this);
-                       this.res = res_hu_conv;
-               }
-               public Result_InMemoryChannelKeysDecodeErrorZ_OK(InMemoryChannelKeys res) {
-                       this(null, bindings.CResult_InMemoryChannelKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
-       }
-
-       public static final class Result_InMemoryChannelKeysDecodeErrorZ_Err extends Result_InMemoryChannelKeysDecodeErrorZ {
-               public final DecodeError err;
-               private Result_InMemoryChannelKeysDecodeErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       long err = bindings.LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(ptr);
-                       DecodeError err_hu_conv = new DecodeError(null, err);
-                       err_hu_conv.ptrs_to.add(this);
-                       this.err = err_hu_conv;
-               }
-               public Result_InMemoryChannelKeysDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_InMemoryChannelKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
-       }
-}
diff --git a/src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InMemorySignerDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..997fd16
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
+       private Result_InMemorySignerDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_InMemorySignerDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_InMemorySignerDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_InMemorySignerDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_InMemorySignerDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_InMemorySignerDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_InMemorySignerDecodeErrorZ_OK extends Result_InMemorySignerDecodeErrorZ {
+               public final InMemorySigner res;
+               private Result_InMemorySignerDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_InMemorySignerDecodeErrorZ_get_ok(ptr);
+                       InMemorySigner res_hu_conv = new InMemorySigner(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_InMemorySignerDecodeErrorZ_OK(InMemorySigner res) {
+                       this(null, bindings.CResult_InMemorySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_InMemorySignerDecodeErrorZ_Err extends Result_InMemorySignerDecodeErrorZ {
+               public final DecodeError err;
+               private Result_InMemorySignerDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_InMemorySignerDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_InMemorySignerDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_InMemorySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_InitFeaturesDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..fd40138
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
+       private Result_InitFeaturesDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_InitFeaturesDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_InitFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_InitFeaturesDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_InitFeaturesDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_InitFeaturesDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_InitFeaturesDecodeErrorZ_OK extends Result_InitFeaturesDecodeErrorZ {
+               public final InitFeatures res;
+               private Result_InitFeaturesDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_InitFeaturesDecodeErrorZ_get_ok(ptr);
+                       InitFeatures res_hu_conv = new InitFeatures(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_InitFeaturesDecodeErrorZ_OK(InitFeatures res) {
+                       this(null, bindings.CResult_InitFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_InitFeaturesDecodeErrorZ_Err extends Result_InitFeaturesDecodeErrorZ {
+               public final DecodeError err;
+               private Result_InitFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_InitFeaturesDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_InitFeaturesDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_InitFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
index a475625d0c7baea32fce2758727c19c0428d00a9..5d626453c5498c39858e3661d2735fb20f2da45e 100644 (file)
@@ -31,14 +31,6 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
                public Result_NetworkGraphDecodeErrorZ_OK(NetworkGraph res) {
                        this(null, bindings.CResult_NetworkGraphDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
                        this.ptrs_to.add(res);
-                       // 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, res is reset to null and is now a dummy object.
-                       res.ptr = 0;
                }
        }
 
diff --git a/src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeAnnouncementDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..5c10a66
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
+       private Result_NodeAnnouncementDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_NodeAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_NodeAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_NodeAnnouncementDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_NodeAnnouncementDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_NodeAnnouncementDecodeErrorZ_OK extends Result_NodeAnnouncementDecodeErrorZ {
+               public final NodeAnnouncement res;
+               private Result_NodeAnnouncementDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(ptr);
+                       NodeAnnouncement res_hu_conv = new NodeAnnouncement(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_NodeAnnouncementDecodeErrorZ_OK(NodeAnnouncement res) {
+                       this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_NodeAnnouncementDecodeErrorZ_Err extends Result_NodeAnnouncementDecodeErrorZ {
+               public final DecodeError err;
+               private Result_NodeAnnouncementDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_NodeAnnouncementDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_NodeFeaturesDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..bc6d668
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
+       private Result_NodeFeaturesDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_NodeFeaturesDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_NodeFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_NodeFeaturesDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_NodeFeaturesDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_NodeFeaturesDecodeErrorZ_OK extends Result_NodeFeaturesDecodeErrorZ {
+               public final NodeFeatures res;
+               private Result_NodeFeaturesDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(ptr);
+                       NodeFeatures res_hu_conv = new NodeFeatures(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_NodeFeaturesDecodeErrorZ_OK(NodeFeatures res) {
+                       this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_NodeFeaturesDecodeErrorZ_Err extends Result_NodeFeaturesDecodeErrorZ {
+               public final DecodeError err;
+               private Result_NodeFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_NodeFeaturesDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_NodeFeaturesDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
index 7b0f72bc6196095d24501b8cc1afea6f37c4c73b..d0ed47a4d292e826d8637abae96b44b1b7453ca1 100644 (file)
@@ -33,13 +33,12 @@ public class Result_NonePaymentSendFailureZ extends CommonBase {
                private Result_NonePaymentSendFailureZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        long err = bindings.LDKCResult_NonePaymentSendFailureZ_get_err(ptr);
-                       PaymentSendFailure err_hu_conv = new PaymentSendFailure(null, err);
+                       PaymentSendFailure err_hu_conv = PaymentSendFailure.constr_from_ptr(err);
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
                public Result_NonePaymentSendFailureZ_Err(PaymentSendFailure err) {
-                       this(null, bindings.CResult_NonePaymentSendFailureZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
+                       this(null, bindings.CResult_NonePaymentSendFailureZ_err(err.ptr));
                }
        }
 }
diff --git a/src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OpenChannelDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..e891561
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_OpenChannelDecodeErrorZ extends CommonBase {
+       private Result_OpenChannelDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_OpenChannelDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_OpenChannelDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_OpenChannelDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_OpenChannelDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_OpenChannelDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_OpenChannelDecodeErrorZ_OK extends Result_OpenChannelDecodeErrorZ {
+               public final OpenChannel res;
+               private Result_OpenChannelDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_OpenChannelDecodeErrorZ_get_ok(ptr);
+                       OpenChannel res_hu_conv = new OpenChannel(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_OpenChannelDecodeErrorZ_OK(OpenChannel res) {
+                       this(null, bindings.CResult_OpenChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_OpenChannelDecodeErrorZ_Err extends Result_OpenChannelDecodeErrorZ {
+               public final DecodeError err;
+               private Result_OpenChannelDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_OpenChannelDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_OpenChannelDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_OpenChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_OutPointDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..8f59f08
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_OutPointDecodeErrorZ extends CommonBase {
+       private Result_OutPointDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_OutPointDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_OutPointDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_OutPointDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_OutPointDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_OutPointDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_OutPointDecodeErrorZ_OK extends Result_OutPointDecodeErrorZ {
+               public final OutPoint res;
+               private Result_OutPointDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_OutPointDecodeErrorZ_get_ok(ptr);
+                       OutPoint res_hu_conv = new OutPoint(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_OutPointDecodeErrorZ_OK(OutPoint res) {
+                       this(null, bindings.CResult_OutPointDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_OutPointDecodeErrorZ_Err extends Result_OutPointDecodeErrorZ {
+               public final DecodeError err;
+               private Result_OutPointDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_OutPointDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_OutPointDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_OutPointDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_PublicKeyErrorZ.java b/src/main/java/org/ldk/structs/Result_PublicKeyErrorZ.java
new file mode 100644 (file)
index 0000000..f941cd2
--- /dev/null
@@ -0,0 +1,43 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_PublicKeyErrorZ extends CommonBase {
+       private Result_PublicKeyErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_PublicKeyErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_PublicKeyErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_PublicKeyErrorZ_result_ok(ptr)) {
+                       return new Result_PublicKeyErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_PublicKeyErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_PublicKeyErrorZ_OK extends Result_PublicKeyErrorZ {
+               public final byte[] res;
+               private Result_PublicKeyErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.res = bindings.LDKCResult_PublicKeyErrorZ_get_ok(ptr);
+               }
+               public Result_PublicKeyErrorZ_OK(byte[] res) {
+                       this(null, bindings.CResult_PublicKeyErrorZ_ok(res));
+               }
+       }
+
+       public static final class Result_PublicKeyErrorZ_Err extends Result_PublicKeyErrorZ {
+               public final LDKSecp256k1Error err;
+               private Result_PublicKeyErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.LDKCResult_PublicKeyErrorZ_get_err(ptr);
+               }
+               public Result_PublicKeyErrorZ_Err(LDKSecp256k1Error err) {
+                       this(null, bindings.CResult_PublicKeyErrorZ_err(err));
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_PublicKeySecpErrorZ.java b/src/main/java/org/ldk/structs/Result_PublicKeySecpErrorZ.java
deleted file mode 100644 (file)
index 15c27f4..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class Result_PublicKeySecpErrorZ extends CommonBase {
-       private Result_PublicKeySecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_PublicKeySecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_PublicKeySecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_PublicKeySecpErrorZ_result_ok(ptr)) {
-                       return new Result_PublicKeySecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_PublicKeySecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_PublicKeySecpErrorZ_OK extends Result_PublicKeySecpErrorZ {
-               public final byte[] res;
-               private Result_PublicKeySecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.res = bindings.LDKCResult_PublicKeySecpErrorZ_get_ok(ptr);
-               }
-               public Result_PublicKeySecpErrorZ_OK(byte[] res) {
-                       this(null, bindings.CResult_PublicKeySecpErrorZ_ok(res));
-               }
-       }
-
-       public static final class Result_PublicKeySecpErrorZ_Err extends Result_PublicKeySecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_PublicKeySecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_PublicKeySecpErrorZ_get_err(ptr);
-               }
-               public Result_PublicKeySecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_PublicKeySecpErrorZ_err(err));
-               }
-       }
-}
diff --git a/src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_RevokeAndACKDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..207f5b7
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
+       private Result_RevokeAndACKDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_RevokeAndACKDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_RevokeAndACKDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_RevokeAndACKDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_RevokeAndACKDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_RevokeAndACKDecodeErrorZ_OK extends Result_RevokeAndACKDecodeErrorZ {
+               public final RevokeAndACK res;
+               private Result_RevokeAndACKDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(ptr);
+                       RevokeAndACK res_hu_conv = new RevokeAndACK(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_RevokeAndACKDecodeErrorZ_OK(RevokeAndACK res) {
+                       this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_RevokeAndACKDecodeErrorZ_Err extends Result_RevokeAndACKDecodeErrorZ {
+               public final DecodeError err;
+               private Result_RevokeAndACKDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_RevokeAndACKDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_RevokeAndACKDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_SecretKeyErrorZ.java b/src/main/java/org/ldk/structs/Result_SecretKeyErrorZ.java
new file mode 100644 (file)
index 0000000..1d32353
--- /dev/null
@@ -0,0 +1,43 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_SecretKeyErrorZ extends CommonBase {
+       private Result_SecretKeyErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_SecretKeyErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_SecretKeyErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_SecretKeyErrorZ_result_ok(ptr)) {
+                       return new Result_SecretKeyErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_SecretKeyErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_SecretKeyErrorZ_OK extends Result_SecretKeyErrorZ {
+               public final byte[] res;
+               private Result_SecretKeyErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.res = bindings.LDKCResult_SecretKeyErrorZ_get_ok(ptr);
+               }
+               public Result_SecretKeyErrorZ_OK(byte[] res) {
+                       this(null, bindings.CResult_SecretKeyErrorZ_ok(res));
+               }
+       }
+
+       public static final class Result_SecretKeyErrorZ_Err extends Result_SecretKeyErrorZ {
+               public final LDKSecp256k1Error err;
+               private Result_SecretKeyErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.LDKCResult_SecretKeyErrorZ_get_err(ptr);
+               }
+               public Result_SecretKeyErrorZ_Err(LDKSecp256k1Error err) {
+                       this(null, bindings.CResult_SecretKeyErrorZ_err(err));
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_SecretKeySecpErrorZ.java b/src/main/java/org/ldk/structs/Result_SecretKeySecpErrorZ.java
deleted file mode 100644 (file)
index 01744be..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class Result_SecretKeySecpErrorZ extends CommonBase {
-       private Result_SecretKeySecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_SecretKeySecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_SecretKeySecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_SecretKeySecpErrorZ_result_ok(ptr)) {
-                       return new Result_SecretKeySecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_SecretKeySecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_SecretKeySecpErrorZ_OK extends Result_SecretKeySecpErrorZ {
-               public final byte[] res;
-               private Result_SecretKeySecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.res = bindings.LDKCResult_SecretKeySecpErrorZ_get_ok(ptr);
-               }
-               public Result_SecretKeySecpErrorZ_OK(byte[] res) {
-                       this(null, bindings.CResult_SecretKeySecpErrorZ_ok(res));
-               }
-       }
-
-       public static final class Result_SecretKeySecpErrorZ_Err extends Result_SecretKeySecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_SecretKeySecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_SecretKeySecpErrorZ_get_err(ptr);
-               }
-               public Result_SecretKeySecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_SecretKeySecpErrorZ_err(err));
-               }
-       }
-}
diff --git a/src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_ShutdownDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..c696120
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_ShutdownDecodeErrorZ extends CommonBase {
+       private Result_ShutdownDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ShutdownDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ShutdownDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ShutdownDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ShutdownDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ShutdownDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ShutdownDecodeErrorZ_OK extends Result_ShutdownDecodeErrorZ {
+               public final Shutdown res;
+               private Result_ShutdownDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_ShutdownDecodeErrorZ_get_ok(ptr);
+                       Shutdown res_hu_conv = new Shutdown(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ShutdownDecodeErrorZ_OK(Shutdown res) {
+                       this(null, bindings.CResult_ShutdownDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ShutdownDecodeErrorZ_Err extends Result_ShutdownDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ShutdownDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_ShutdownDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ShutdownDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ShutdownDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_SignDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_SignDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..b5b33d5
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_SignDecodeErrorZ extends CommonBase {
+       private Result_SignDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_SignDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_SignDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_SignDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_SignDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_SignDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_SignDecodeErrorZ_OK extends Result_SignDecodeErrorZ {
+               public final Sign res;
+               private Result_SignDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_SignDecodeErrorZ_get_ok(ptr);
+                       Sign ret_hu_conv = new Sign(null, res);
+                       ret_hu_conv.ptrs_to.add(this);
+                       this.res = ret_hu_conv;
+               }
+               public Result_SignDecodeErrorZ_OK(Sign res) {
+                       this(null, bindings.CResult_SignDecodeErrorZ_ok(res == null ? 0 : res.ptr));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_SignDecodeErrorZ_Err extends Result_SignDecodeErrorZ {
+               public final DecodeError err;
+               private Result_SignDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_SignDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_SignDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_SignDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_TransactionNoneZ.java b/src/main/java/org/ldk/structs/Result_TransactionNoneZ.java
new file mode 100644 (file)
index 0000000..d03b528
--- /dev/null
@@ -0,0 +1,41 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_TransactionNoneZ extends CommonBase {
+       private Result_TransactionNoneZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_TransactionNoneZ_free(ptr); } super.finalize();
+       }
+
+       static Result_TransactionNoneZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_TransactionNoneZ_result_ok(ptr)) {
+                       return new Result_TransactionNoneZ_OK(null, ptr);
+               } else {
+                       return new Result_TransactionNoneZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_TransactionNoneZ_OK extends Result_TransactionNoneZ {
+               public final byte[] res;
+               private Result_TransactionNoneZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.res = bindings.LDKCResult_TransactionNoneZ_get_ok(ptr);
+               }
+               public Result_TransactionNoneZ_OK(byte[] res) {
+                       this(null, bindings.CResult_TransactionNoneZ_ok(res));
+               }
+       }
+
+       public static final class Result_TransactionNoneZ_Err extends Result_TransactionNoneZ {
+               private Result_TransactionNoneZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+               }
+               public Result_TransactionNoneZ_Err() {
+                       this(null, bindings.CResult_TransactionNoneZ_err());
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_TxCreationKeysDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..f1f5d23
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
+       private Result_TxCreationKeysDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_TxCreationKeysDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_TxCreationKeysDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_TxCreationKeysDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_TxCreationKeysDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_TxCreationKeysDecodeErrorZ_OK extends Result_TxCreationKeysDecodeErrorZ {
+               public final TxCreationKeys res;
+               private Result_TxCreationKeysDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(ptr);
+                       TxCreationKeys res_hu_conv = new TxCreationKeys(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_TxCreationKeysDecodeErrorZ_OK(TxCreationKeys res) {
+                       this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_TxCreationKeysDecodeErrorZ_Err extends Result_TxCreationKeysDecodeErrorZ {
+               public final DecodeError err;
+               private Result_TxCreationKeysDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_TxCreationKeysDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_TxCreationKeysDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_TxCreationKeysErrorZ.java b/src/main/java/org/ldk/structs/Result_TxCreationKeysErrorZ.java
new file mode 100644 (file)
index 0000000..3d951aa
--- /dev/null
@@ -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;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_TxCreationKeysErrorZ extends CommonBase {
+       private Result_TxCreationKeysErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_TxCreationKeysErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_TxCreationKeysErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_TxCreationKeysErrorZ_result_ok(ptr)) {
+                       return new Result_TxCreationKeysErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_TxCreationKeysErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_TxCreationKeysErrorZ_OK extends Result_TxCreationKeysErrorZ {
+               public final TxCreationKeys res;
+               private Result_TxCreationKeysErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_TxCreationKeysErrorZ_get_ok(ptr);
+                       TxCreationKeys res_hu_conv = new TxCreationKeys(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_TxCreationKeysErrorZ_OK(TxCreationKeys res) {
+                       this(null, bindings.CResult_TxCreationKeysErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_TxCreationKeysErrorZ_Err extends Result_TxCreationKeysErrorZ {
+               public final LDKSecp256k1Error err;
+               private Result_TxCreationKeysErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.LDKCResult_TxCreationKeysErrorZ_get_err(ptr);
+               }
+               public Result_TxCreationKeysErrorZ_Err(LDKSecp256k1Error err) {
+                       this(null, bindings.CResult_TxCreationKeysErrorZ_err(err));
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_TxCreationKeysSecpErrorZ.java b/src/main/java/org/ldk/structs/Result_TxCreationKeysSecpErrorZ.java
deleted file mode 100644 (file)
index 3ee052d..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-package org.ldk.structs;
-
-import org.ldk.impl.bindings;
-import org.ldk.enums.*;
-import org.ldk.util.*;
-import java.util.Arrays;
-
-@SuppressWarnings("unchecked") // We correctly assign various generic arrays
-public class Result_TxCreationKeysSecpErrorZ extends CommonBase {
-       private Result_TxCreationKeysSecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_TxCreationKeysSecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_TxCreationKeysSecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_TxCreationKeysSecpErrorZ_result_ok(ptr)) {
-                       return new Result_TxCreationKeysSecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_TxCreationKeysSecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_TxCreationKeysSecpErrorZ_OK extends Result_TxCreationKeysSecpErrorZ {
-               public final TxCreationKeys res;
-               private Result_TxCreationKeysSecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       long res = bindings.LDKCResult_TxCreationKeysSecpErrorZ_get_ok(ptr);
-                       TxCreationKeys res_hu_conv = new TxCreationKeys(null, res);
-                       res_hu_conv.ptrs_to.add(this);
-                       this.res = res_hu_conv;
-               }
-               public Result_TxCreationKeysSecpErrorZ_OK(TxCreationKeys res) {
-                       this(null, bindings.CResult_TxCreationKeysSecpErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
-       }
-
-       public static final class Result_TxCreationKeysSecpErrorZ_Err extends Result_TxCreationKeysSecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_TxCreationKeysSecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_TxCreationKeysSecpErrorZ_get_err(ptr);
-               }
-               public Result_TxCreationKeysSecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_TxCreationKeysSecpErrorZ_err(err));
-               }
-       }
-}
diff --git a/src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateAddHTLCDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..83251e5
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
+       private Result_UpdateAddHTLCDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UpdateAddHTLCDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_UpdateAddHTLCDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_UpdateAddHTLCDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UpdateAddHTLCDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UpdateAddHTLCDecodeErrorZ_OK extends Result_UpdateAddHTLCDecodeErrorZ {
+               public final UpdateAddHTLC res;
+               private Result_UpdateAddHTLCDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(ptr);
+                       UpdateAddHTLC res_hu_conv = new UpdateAddHTLC(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_UpdateAddHTLCDecodeErrorZ_OK(UpdateAddHTLC res) {
+                       this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_UpdateAddHTLCDecodeErrorZ_Err extends Result_UpdateAddHTLCDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UpdateAddHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_UpdateAddHTLCDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFailHTLCDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..77ebe7e
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
+       private Result_UpdateFailHTLCDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UpdateFailHTLCDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_UpdateFailHTLCDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_UpdateFailHTLCDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UpdateFailHTLCDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UpdateFailHTLCDecodeErrorZ_OK extends Result_UpdateFailHTLCDecodeErrorZ {
+               public final UpdateFailHTLC res;
+               private Result_UpdateFailHTLCDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(ptr);
+                       UpdateFailHTLC res_hu_conv = new UpdateFailHTLC(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_UpdateFailHTLCDecodeErrorZ_OK(UpdateFailHTLC res) {
+                       this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_UpdateFailHTLCDecodeErrorZ_Err extends Result_UpdateFailHTLCDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UpdateFailHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_UpdateFailHTLCDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..0cedc44
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
+       private Result_UpdateFailMalformedHTLCDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_UpdateFailMalformedHTLCDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UpdateFailMalformedHTLCDecodeErrorZ_OK extends Result_UpdateFailMalformedHTLCDecodeErrorZ {
+               public final UpdateFailMalformedHTLC res;
+               private Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(ptr);
+                       UpdateFailMalformedHTLC res_hu_conv = new UpdateFailMalformedHTLC(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(UpdateFailMalformedHTLC res) {
+                       this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_UpdateFailMalformedHTLCDecodeErrorZ_Err extends Result_UpdateFailMalformedHTLCDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFeeDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..05d4a28
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
+       private Result_UpdateFeeDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UpdateFeeDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_UpdateFeeDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_UpdateFeeDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_UpdateFeeDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UpdateFeeDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UpdateFeeDecodeErrorZ_OK extends Result_UpdateFeeDecodeErrorZ {
+               public final UpdateFee res;
+               private Result_UpdateFeeDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_UpdateFeeDecodeErrorZ_get_ok(ptr);
+                       UpdateFee res_hu_conv = new UpdateFee(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_UpdateFeeDecodeErrorZ_OK(UpdateFee res) {
+                       this(null, bindings.CResult_UpdateFeeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_UpdateFeeDecodeErrorZ_Err extends Result_UpdateFeeDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UpdateFeeDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_UpdateFeeDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_UpdateFeeDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_UpdateFeeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java b/src/main/java/org/ldk/structs/Result_UpdateFulfillHTLCDecodeErrorZ.java
new file mode 100644 (file)
index 0000000..fb60f5e
--- /dev/null
@@ -0,0 +1,51 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
+       private Result_UpdateFulfillHTLCDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_UpdateFulfillHTLCDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_UpdateFulfillHTLCDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UpdateFulfillHTLCDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UpdateFulfillHTLCDecodeErrorZ_OK extends Result_UpdateFulfillHTLCDecodeErrorZ {
+               public final UpdateFulfillHTLC res;
+               private Result_UpdateFulfillHTLCDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long res = bindings.LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(ptr);
+                       UpdateFulfillHTLC res_hu_conv = new UpdateFulfillHTLC(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_UpdateFulfillHTLCDecodeErrorZ_OK(UpdateFulfillHTLC res) {
+                       this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_UpdateFulfillHTLCDecodeErrorZ_Err extends Result_UpdateFulfillHTLCDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UpdateFulfillHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       long err = bindings.LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(ptr);
+                       DecodeError err_hu_conv = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_UpdateFulfillHTLCDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
index dcf6ddd95167123ddbda58973301ce6f79b584d3..80fe9b59495921cbbb18a20a565347f193af75e9 100644 (file)
@@ -14,13 +14,6 @@ public class RevokeAndACK extends CommonBase {
                if (ptr != 0) { bindings.RevokeAndACK_free(ptr); }
        }
 
-       public RevokeAndACK clone() {
-               long ret = bindings.RevokeAndACK_clone(this.ptr);
-               RevokeAndACK ret_hu_conv = new RevokeAndACK(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.RevokeAndACK_get_channel_id(this.ptr);
                return ret;
@@ -55,15 +48,21 @@ public class RevokeAndACK extends CommonBase {
                return ret_hu_conv;
        }
 
+       public RevokeAndACK clone() {
+               long ret = bindings.RevokeAndACK_clone(this.ptr);
+               RevokeAndACK ret_hu_conv = new RevokeAndACK(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.RevokeAndACK_write(this.ptr);
                return ret;
        }
 
-       public static RevokeAndACK constructor_read(byte[] ser) {
+       public static Result_RevokeAndACKDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.RevokeAndACK_read(ser);
-               RevokeAndACK ret_hu_conv = new RevokeAndACK(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index cb0f6a2b290f56d944a1f4054892e6cdf731abd8..a05f15b662ac184a97818da4abc0f0d6eb577b2f 100644 (file)
@@ -14,26 +14,26 @@ public class Route extends CommonBase {
                if (ptr != 0) { bindings.Route_free(ptr); }
        }
 
-       public Route clone() {
-               long ret = bindings.Route_clone(this.ptr);
-               Route ret_hu_conv = new Route(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_paths(RouteHop[][] val) {
-               bindings.Route_set_paths(this.ptr, (long[][])Arrays.stream(val).map(arr_conv_12 -> Arrays.stream(arr_conv_12).mapToLong(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray());
+               bindings.Route_set_paths(this.ptr, Arrays.stream(val).map(val_conv_12 -> Arrays.stream(val_conv_12).mapToLong(val_conv_12_conv_10 -> val_conv_12_conv_10 == null ? 0 : val_conv_12_conv_10.ptr & ~1).toArray()).toArray(long[][]::new));
                /* TODO 2 RouteHop[]  */;
        }
 
        public static Route constructor_new(RouteHop[][] paths_arg) {
-               long ret = bindings.Route_new((long[][])Arrays.stream(paths_arg).map(arr_conv_12 -> Arrays.stream(arr_conv_12).mapToLong(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray());
+               long ret = bindings.Route_new(Arrays.stream(paths_arg).map(paths_arg_conv_12 -> Arrays.stream(paths_arg_conv_12).mapToLong(paths_arg_conv_12_conv_10 -> paths_arg_conv_12_conv_10 == null ? 0 : paths_arg_conv_12_conv_10.ptr & ~1).toArray()).toArray(long[][]::new));
                Route ret_hu_conv = new Route(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                /* TODO 2 RouteHop[]  */;
                return ret_hu_conv;
        }
 
+       public Route clone() {
+               long ret = bindings.Route_clone(this.ptr);
+               Route ret_hu_conv = new Route(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.Route_write(this.ptr);
                return ret;
index f543b75aac07d3ccad1e3a63e1dcbd29a5b7acfd..fc1e424979e5efe6f4243f5b02c985418250fd1e 100644 (file)
@@ -14,13 +14,6 @@ public class RouteHint extends CommonBase {
                if (ptr != 0) { bindings.RouteHint_free(ptr); }
        }
 
-       public RouteHint clone() {
-               long ret = bindings.RouteHint_clone(this.ptr);
-               RouteHint ret_hu_conv = new RouteHint(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_src_node_id() {
                byte[] ret = bindings.RouteHint_get_src_node_id(this.ptr);
                return ret;
@@ -60,20 +53,10 @@ public class RouteHint extends CommonBase {
                bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
        }
 
-       public long get_htlc_minimum_msat() {
-               long ret = bindings.RouteHint_get_htlc_minimum_msat(this.ptr);
-               return ret;
-       }
-
-       public void set_htlc_minimum_msat(long val) {
-               bindings.RouteHint_set_htlc_minimum_msat(this.ptr, val);
-       }
-
-       public static RouteHint constructor_new(byte[] src_node_id_arg, long short_channel_id_arg, RoutingFees fees_arg, short cltv_expiry_delta_arg, long htlc_minimum_msat_arg) {
-               long ret = bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
+       public RouteHint clone() {
+               long ret = bindings.RouteHint_clone(this.ptr);
                RouteHint ret_hu_conv = new RouteHint(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(fees_arg);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
index ace10a9b2eea39fe6705324d07f856de303ca55f..1e36ed5935fe2de7e76995d5bff4d88d01a64896 100644 (file)
@@ -14,13 +14,6 @@ public class RouteHop extends CommonBase {
                if (ptr != 0) { bindings.RouteHop_free(ptr); }
        }
 
-       public RouteHop clone() {
-               long ret = bindings.RouteHop_clone(this.ptr);
-               RouteHop ret_hu_conv = new RouteHop(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_pubkey() {
                byte[] ret = bindings.RouteHop_get_pubkey(this.ptr);
                return ret;
@@ -40,14 +33,6 @@ public class RouteHop extends CommonBase {
        public void set_node_features(NodeFeatures val) {
                bindings.RouteHop_set_node_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public long get_short_channel_id() {
@@ -69,14 +54,6 @@ public class RouteHop extends CommonBase {
        public void set_channel_features(ChannelFeatures val) {
                bindings.RouteHop_set_channel_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public long get_fee_msat() {
@@ -102,23 +79,14 @@ public class RouteHop extends CommonBase {
                RouteHop ret_hu_conv = new RouteHop(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(node_features_arg);
-               // 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, node_features_arg is reset to null and is now a dummy object.
-               node_features_arg.ptr = 0;
                ret_hu_conv.ptrs_to.add(channel_features_arg);
-               // 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, channel_features_arg is reset to null and is now a dummy object.
-               channel_features_arg.ptr = 0;
+               return ret_hu_conv;
+       }
+
+       public RouteHop clone() {
+               long ret = bindings.RouteHop_clone(this.ptr);
+               RouteHop ret_hu_conv = new RouteHop(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
index c11990a3a3bb6e776ea7531995fc634d6d55a7df..da1c5c48000790507505b2d2dc6599c037313df4 100644 (file)
@@ -14,13 +14,6 @@ public class RoutingFees extends CommonBase {
                if (ptr != 0) { bindings.RoutingFees_free(ptr); }
        }
 
-       public RoutingFees clone() {
-               long ret = bindings.RoutingFees_clone(this.ptr);
-               RoutingFees ret_hu_conv = new RoutingFees(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public int get_base_msat() {
                int ret = bindings.RoutingFees_get_base_msat(this.ptr);
                return ret;
@@ -46,6 +39,13 @@ public class RoutingFees extends CommonBase {
                return ret_hu_conv;
        }
 
+       public RoutingFees clone() {
+               long ret = bindings.RoutingFees_clone(this.ptr);
+               RoutingFees ret_hu_conv = new RoutingFees(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_RoutingFeesDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.RoutingFees_read(ser);
                Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
index 8a50a54b4aeba579c6dcdb76fc91a75165181948..4efd6b24b52b3843344da8268be283a83a5d6736 100644 (file)
@@ -61,13 +61,13 @@ public class RoutingMessageHandler extends CommonBase {
                        }
                        @Override public long[] get_next_channel_announcements(long starting_point, byte batch_amount) {
                                ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret = arg.get_next_channel_announcements(starting_point, batch_amount);
-                               long[] result = Arrays.stream(ret).mapToLong(arr_conv_63 -> bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(arr_conv_63.a == null ? 0 : arr_conv_63.a.ptr & ~1, arr_conv_63.b == null ? 0 : arr_conv_63.b.ptr & ~1, arr_conv_63.c == null ? 0 : arr_conv_63.c.ptr & ~1)).toArray();
+                               long[] result = Arrays.stream(ret).mapToLong(ret_conv_63 -> bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(ret_conv_63.a == null ? 0 : ret_conv_63.a.ptr & ~1, ret_conv_63.b == null ? 0 : ret_conv_63.b.ptr & ~1, ret_conv_63.c == null ? 0 : ret_conv_63.c.ptr & ~1)).toArray();
                                /* TODO 2 ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>  */;
                                return result;
                        }
                        @Override public long[] get_next_node_announcements(byte[] starting_point, byte batch_amount) {
                                NodeAnnouncement[] ret = arg.get_next_node_announcements(starting_point, batch_amount);
-                               long[] result = Arrays.stream(ret).mapToLong(arr_conv_18 -> arr_conv_18 == null ? 0 : arr_conv_18.ptr & ~1).toArray();
+                               long[] result = Arrays.stream(ret).mapToLong(ret_conv_18 -> ret_conv_18 == null ? 0 : ret_conv_18.ptr & ~1).toArray();
                                /* TODO 2 NodeAnnouncement  */;
                                return result;
                        }
@@ -134,39 +134,39 @@ public class RoutingMessageHandler extends CommonBase {
 
        public ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] get_next_channel_announcements(long starting_point, byte batch_amount) {
                long[] ret = bindings.RoutingMessageHandler_get_next_channel_announcements(this.ptr, starting_point, batch_amount);
-               ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] arr_conv_63_arr = new ThreeTuple[ret.length];
+               ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret_conv_63_arr = new ThreeTuple[ret.length];
                for (int l = 0; l < ret.length; l++) {
-                       long arr_conv_63 = ret[l];
-                       long arr_conv_63_a = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(arr_conv_63);
-                       ChannelAnnouncement arr_conv_63_a_hu_conv = new ChannelAnnouncement(null, arr_conv_63_a);
-                       arr_conv_63_a_hu_conv.ptrs_to.add(this);;
-                       long arr_conv_63_b = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(arr_conv_63);
-                       ChannelUpdate arr_conv_63_b_hu_conv = new ChannelUpdate(null, arr_conv_63_b);
-                       arr_conv_63_b_hu_conv.ptrs_to.add(this);;
-                       long arr_conv_63_c = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(arr_conv_63);
-                       ChannelUpdate arr_conv_63_c_hu_conv = new ChannelUpdate(null, arr_conv_63_c);
-                       arr_conv_63_c_hu_conv.ptrs_to.add(this);;
-                       ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> arr_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(arr_conv_63_a_hu_conv, arr_conv_63_b_hu_conv, arr_conv_63_c_hu_conv, () -> {
-                               bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(arr_conv_63);
+                       long ret_conv_63 = ret[l];
+                       long ret_conv_63_a = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(ret_conv_63);
+                       ChannelAnnouncement ret_conv_63_a_hu_conv = new ChannelAnnouncement(null, ret_conv_63_a);
+                       ret_conv_63_a_hu_conv.ptrs_to.add(this);;
+                       long ret_conv_63_b = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(ret_conv_63);
+                       ChannelUpdate ret_conv_63_b_hu_conv = new ChannelUpdate(null, ret_conv_63_b);
+                       ret_conv_63_b_hu_conv.ptrs_to.add(this);;
+                       long ret_conv_63_c = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(ret_conv_63);
+                       ChannelUpdate ret_conv_63_c_hu_conv = new ChannelUpdate(null, ret_conv_63_c);
+                       ret_conv_63_c_hu_conv.ptrs_to.add(this);;
+                       ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> ret_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(ret_conv_63_a_hu_conv, ret_conv_63_b_hu_conv, ret_conv_63_c_hu_conv, () -> {
+                               bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(ret_conv_63);
                        });
-                       arr_conv_63_a_hu_conv.ptrs_to.add(arr_conv_63_conv);
-                       arr_conv_63_b_hu_conv.ptrs_to.add(arr_conv_63_conv);
-                       arr_conv_63_c_hu_conv.ptrs_to.add(arr_conv_63_conv);
-                       arr_conv_63_arr[l] = arr_conv_63_conv;
+                       ret_conv_63_a_hu_conv.ptrs_to.add(ret_conv_63_conv);
+                       ret_conv_63_b_hu_conv.ptrs_to.add(ret_conv_63_conv);
+                       ret_conv_63_c_hu_conv.ptrs_to.add(ret_conv_63_conv);
+                       ret_conv_63_arr[l] = ret_conv_63_conv;
                }
-               return arr_conv_63_arr;
+               return ret_conv_63_arr;
        }
 
        public NodeAnnouncement[] get_next_node_announcements(byte[] starting_point, byte batch_amount) {
                long[] ret = bindings.RoutingMessageHandler_get_next_node_announcements(this.ptr, starting_point, batch_amount);
-               NodeAnnouncement[] arr_conv_18_arr = new NodeAnnouncement[ret.length];
+               NodeAnnouncement[] ret_conv_18_arr = new NodeAnnouncement[ret.length];
                for (int s = 0; s < ret.length; s++) {
-                       long arr_conv_18 = ret[s];
-                       NodeAnnouncement arr_conv_18_hu_conv = new NodeAnnouncement(null, arr_conv_18);
-                       arr_conv_18_hu_conv.ptrs_to.add(this);
-                       arr_conv_18_arr[s] = arr_conv_18_hu_conv;
+                       long ret_conv_18 = ret[s];
+                       NodeAnnouncement ret_conv_18_hu_conv = new NodeAnnouncement(null, ret_conv_18);
+                       ret_conv_18_hu_conv.ptrs_to.add(this);
+                       ret_conv_18_arr[s] = ret_conv_18_hu_conv;
                }
-               return arr_conv_18_arr;
+               return ret_conv_18_arr;
        }
 
        public void sync_routing_table(byte[] their_node_id, Init init) {
index 491939cd70e2db356a66f17f7454d7803d6d9e05..ec11fcc00363c6f48f1a798dcd4b75377f025392 100644 (file)
@@ -14,13 +14,6 @@ public class Shutdown extends CommonBase {
                if (ptr != 0) { bindings.Shutdown_free(ptr); }
        }
 
-       public Shutdown clone() {
-               long ret = bindings.Shutdown_clone(this.ptr);
-               Shutdown ret_hu_conv = new Shutdown(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.Shutdown_get_channel_id(this.ptr);
                return ret;
@@ -46,15 +39,21 @@ public class Shutdown extends CommonBase {
                return ret_hu_conv;
        }
 
+       public Shutdown clone() {
+               long ret = bindings.Shutdown_clone(this.ptr);
+               Shutdown ret_hu_conv = new Shutdown(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.Shutdown_write(this.ptr);
                return ret;
        }
 
-       public static Shutdown constructor_read(byte[] ser) {
+       public static Result_ShutdownDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.Shutdown_read(ser);
-               Shutdown ret_hu_conv = new Shutdown(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
diff --git a/src/main/java/org/ldk/structs/Sign.java b/src/main/java/org/ldk/structs/Sign.java
new file mode 100644 (file)
index 0000000..1ab9848
--- /dev/null
@@ -0,0 +1,178 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class Sign extends CommonBase {
+       final bindings.LDKSign bindings_instance;
+       Sign(Object _dummy, long ptr) { super(ptr); bindings_instance = null; }
+       private Sign(bindings.LDKSign arg, ChannelPublicKeys pubkeys) {
+               super(bindings.LDKSign_new(arg, pubkeys == null ? 0 : pubkeys.ptr & ~1));
+               this.ptrs_to.add(arg);
+               this.ptrs_to.add(pubkeys);
+               this.bindings_instance = arg;
+       }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.Sign_free(ptr); } super.finalize();
+       }
+
+       public static interface SignInterface {
+               byte[] get_per_commitment_point(long idx);
+               byte[] release_commitment_secret(long idx);
+               byte[] channel_keys_id();
+               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment(CommitmentTransaction commitment_tx);
+               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs(HolderCommitmentTransaction commitment_tx);
+               Result_SignatureNoneZ sign_justice_transaction(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc);
+               Result_SignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, HTLCOutputInCommitment htlc);
+               Result_SignatureNoneZ sign_closing_transaction(byte[] closing_tx);
+               Result_SignatureNoneZ sign_channel_announcement(UnsignedChannelAnnouncement msg);
+               void ready_channel(ChannelTransactionParameters channel_parameters);
+               byte[] write();
+       }
+       private static class LDKSignHolder { Sign held; }
+       public static Sign new_impl(SignInterface arg, ChannelPublicKeys pubkeys) {
+               final LDKSignHolder impl_holder = new LDKSignHolder();
+               impl_holder.held = new Sign(new bindings.LDKSign() {
+                       @Override public byte[] get_per_commitment_point(long idx) {
+                               byte[] ret = arg.get_per_commitment_point(idx);
+                               return ret;
+                       }
+                       @Override public byte[] release_commitment_secret(long idx) {
+                               byte[] ret = arg.release_commitment_secret(idx);
+                               return ret;
+                       }
+                       @Override public byte[] channel_keys_id() {
+                               byte[] ret = arg.channel_keys_id();
+                               return ret;
+                       }
+                       @Override public long sign_counterparty_commitment(long commitment_tx) {
+                               CommitmentTransaction commitment_tx_hu_conv = new CommitmentTransaction(null, commitment_tx);
+                               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = arg.sign_counterparty_commitment(commitment_tx_hu_conv);
+                               long result = ret != null ? ret.ptr : 0;
+                               return result;
+                       }
+                       @Override public long sign_holder_commitment_and_htlcs(long commitment_tx) {
+                               HolderCommitmentTransaction commitment_tx_hu_conv = new HolderCommitmentTransaction(null, commitment_tx);
+                               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = arg.sign_holder_commitment_and_htlcs(commitment_tx_hu_conv);
+                               long result = ret != null ? ret.ptr : 0;
+                               return result;
+                       }
+                       @Override public long sign_justice_transaction(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, long htlc) {
+                               HTLCOutputInCommitment htlc_hu_conv = new HTLCOutputInCommitment(null, htlc);
+                               Result_SignatureNoneZ ret = arg.sign_justice_transaction(justice_tx, input, amount, per_commitment_key, htlc_hu_conv);
+                               long result = ret != null ? ret.ptr : 0;
+                               return result;
+                       }
+                       @Override public long sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, long htlc) {
+                               HTLCOutputInCommitment htlc_hu_conv = new HTLCOutputInCommitment(null, htlc);
+                               Result_SignatureNoneZ ret = arg.sign_counterparty_htlc_transaction(htlc_tx, input, amount, per_commitment_point, htlc_hu_conv);
+                               long result = ret != null ? ret.ptr : 0;
+                               return result;
+                       }
+                       @Override public long sign_closing_transaction(byte[] closing_tx) {
+                               Result_SignatureNoneZ ret = arg.sign_closing_transaction(closing_tx);
+                               long result = ret != null ? ret.ptr : 0;
+                               return result;
+                       }
+                       @Override public long sign_channel_announcement(long msg) {
+                               UnsignedChannelAnnouncement msg_hu_conv = new UnsignedChannelAnnouncement(null, msg);
+                               Result_SignatureNoneZ ret = arg.sign_channel_announcement(msg_hu_conv);
+                               long result = ret != null ? ret.ptr : 0;
+                               return result;
+                       }
+                       @Override public void ready_channel(long channel_parameters) {
+                               ChannelTransactionParameters channel_parameters_hu_conv = new ChannelTransactionParameters(null, channel_parameters);
+                               arg.ready_channel(channel_parameters_hu_conv);
+                       }
+                       @Override public byte[] write() {
+                               byte[] ret = arg.write();
+                               return ret;
+                       }
+               }, pubkeys);
+               return impl_holder.held;
+       }
+       public byte[] get_per_commitment_point(long idx) {
+               byte[] ret = bindings.Sign_get_per_commitment_point(this.ptr, idx);
+               return ret;
+       }
+
+       public byte[] release_commitment_secret(long idx) {
+               byte[] ret = bindings.Sign_release_commitment_secret(this.ptr, idx);
+               return ret;
+       }
+
+       public byte[] channel_keys_id() {
+               byte[] ret = bindings.Sign_channel_keys_id(this.ptr);
+               return ret;
+       }
+
+       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment(CommitmentTransaction commitment_tx) {
+               long ret = bindings.Sign_sign_counterparty_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr & ~1);
+               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(commitment_tx);
+               return ret_hu_conv;
+       }
+
+       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs(HolderCommitmentTransaction commitment_tx) {
+               long ret = bindings.Sign_sign_holder_commitment_and_htlcs(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr & ~1);
+               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(commitment_tx);
+               return ret_hu_conv;
+       }
+
+       public Result_SignatureNoneZ sign_justice_transaction(byte[] justice_tx, long input, long amount, byte[] per_commitment_key, HTLCOutputInCommitment htlc) {
+               long ret = bindings.Sign_sign_justice_transaction(this.ptr, justice_tx, input, amount, per_commitment_key, htlc == null ? 0 : htlc.ptr & ~1);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(htlc);
+               return ret_hu_conv;
+       }
+
+       public Result_SignatureNoneZ sign_counterparty_htlc_transaction(byte[] htlc_tx, long input, long amount, byte[] per_commitment_point, HTLCOutputInCommitment htlc) {
+               long ret = bindings.Sign_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, per_commitment_point, htlc == null ? 0 : htlc.ptr & ~1);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(htlc);
+               return ret_hu_conv;
+       }
+
+       public Result_SignatureNoneZ sign_closing_transaction(byte[] closing_tx) {
+               long ret = bindings.Sign_sign_closing_transaction(this.ptr, closing_tx);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       public Result_SignatureNoneZ sign_channel_announcement(UnsignedChannelAnnouncement msg) {
+               long ret = bindings.Sign_sign_channel_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(msg);
+               return ret_hu_conv;
+       }
+
+       public void ready_channel(ChannelTransactionParameters channel_parameters) {
+               bindings.Sign_ready_channel(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr & ~1);
+               this.ptrs_to.add(channel_parameters);
+       }
+
+       public byte[] write() {
+               byte[] ret = bindings.Sign_write(this.ptr);
+               return ret;
+       }
+
+       public ChannelPublicKeys get_pubkeys() {
+               long ret = bindings.Sign_get_pubkeys(this.ptr);
+               ChannelPublicKeys ret_hu_conv = new ChannelPublicKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public Sign clone() {
+               long ret = bindings.Sign_clone(this.ptr);
+               Sign ret_hu_conv = new Sign(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}
index eda82f8ebca432cad1c3e863317bb5f43039dd28..3dabd15a9532bed36cdb1ae1983af6625ce46a91 100644 (file)
@@ -18,11 +18,11 @@ public class SpendableOutputDescriptor extends CommonBase {
                if (raw_val.getClass() == bindings.LDKSpendableOutputDescriptor.StaticOutput.class) {
                        return new StaticOutput(ptr, (bindings.LDKSpendableOutputDescriptor.StaticOutput)raw_val);
                }
-               if (raw_val.getClass() == bindings.LDKSpendableOutputDescriptor.DynamicOutputP2WSH.class) {
-                       return new DynamicOutputP2WSH(ptr, (bindings.LDKSpendableOutputDescriptor.DynamicOutputP2WSH)raw_val);
+               if (raw_val.getClass() == bindings.LDKSpendableOutputDescriptor.DelayedPaymentOutput.class) {
+                       return new DelayedPaymentOutput(ptr, (bindings.LDKSpendableOutputDescriptor.DelayedPaymentOutput)raw_val);
                }
-               if (raw_val.getClass() == bindings.LDKSpendableOutputDescriptor.StaticOutputCounterpartyPayment.class) {
-                       return new StaticOutputCounterpartyPayment(ptr, (bindings.LDKSpendableOutputDescriptor.StaticOutputCounterpartyPayment)raw_val);
+               if (raw_val.getClass() == bindings.LDKSpendableOutputDescriptor.StaticPaymentOutput.class) {
+                       return new StaticPaymentOutput(ptr, (bindings.LDKSpendableOutputDescriptor.StaticPaymentOutput)raw_val);
                }
                assert false; return null; // Unreachable without extending the (internal) bindings interface
        }
@@ -41,54 +41,14 @@ public class SpendableOutputDescriptor extends CommonBase {
                        this.output = output_conv;
                }
        }
-       public final static class DynamicOutputP2WSH extends SpendableOutputDescriptor {
-               public final OutPoint outpoint;
-               public final byte[] per_commitment_point;
-               public final short to_self_delay;
-               public final TxOut output;
-               public final TwoTuple<Long, Long> key_derivation_params;
-               public final byte[] revocation_pubkey;
-               private DynamicOutputP2WSH(long ptr, bindings.LDKSpendableOutputDescriptor.DynamicOutputP2WSH obj) {
+       public final static class DelayedPaymentOutput extends SpendableOutputDescriptor {
+               private DelayedPaymentOutput(long ptr, bindings.LDKSpendableOutputDescriptor.DelayedPaymentOutput obj) {
                        super(null, ptr);
-                       long outpoint = obj.outpoint;
-                       OutPoint outpoint_hu_conv = new OutPoint(null, outpoint);
-                       outpoint_hu_conv.ptrs_to.add(this);
-                       this.outpoint = outpoint_hu_conv;
-                       this.per_commitment_point = obj.per_commitment_point;
-                       this.to_self_delay = obj.to_self_delay;
-                       long output = obj.output;
-                       TxOut output_conv = new TxOut(null, output);
-                       this.output = output_conv;
-                       long key_derivation_params = obj.key_derivation_params;
-                       long key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params);
-                       long key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params);
-                       TwoTuple<Long, Long> key_derivation_params_conv = new TwoTuple<Long, Long>(key_derivation_params_a, key_derivation_params_b, () -> {
-                               bindings.C2Tuple_u64u64Z_free(key_derivation_params);
-                       });
-                       this.key_derivation_params = key_derivation_params_conv;
-                       this.revocation_pubkey = obj.revocation_pubkey;
                }
        }
-       public final static class StaticOutputCounterpartyPayment extends SpendableOutputDescriptor {
-               public final OutPoint outpoint;
-               public final TxOut output;
-               public final TwoTuple<Long, Long> key_derivation_params;
-               private StaticOutputCounterpartyPayment(long ptr, bindings.LDKSpendableOutputDescriptor.StaticOutputCounterpartyPayment obj) {
+       public final static class StaticPaymentOutput extends SpendableOutputDescriptor {
+               private StaticPaymentOutput(long ptr, bindings.LDKSpendableOutputDescriptor.StaticPaymentOutput obj) {
                        super(null, ptr);
-                       long outpoint = obj.outpoint;
-                       OutPoint outpoint_hu_conv = new OutPoint(null, outpoint);
-                       outpoint_hu_conv.ptrs_to.add(this);
-                       this.outpoint = outpoint_hu_conv;
-                       long output = obj.output;
-                       TxOut output_conv = new TxOut(null, output);
-                       this.output = output_conv;
-                       long key_derivation_params = obj.key_derivation_params;
-                       long key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params);
-                       long key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params);
-                       TwoTuple<Long, Long> key_derivation_params_conv = new TwoTuple<Long, Long>(key_derivation_params_a, key_derivation_params_b, () -> {
-                               bindings.C2Tuple_u64u64Z_free(key_derivation_params);
-                       });
-                       this.key_derivation_params = key_derivation_params_conv;
                }
        }
 }
diff --git a/src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java b/src/main/java/org/ldk/structs/StaticPaymentOutputDescriptor.java
new file mode 100644 (file)
index 0000000..6fd5fd7
--- /dev/null
@@ -0,0 +1,66 @@
+package org.ldk.structs;
+
+import org.ldk.impl.bindings;
+import org.ldk.enums.*;
+import org.ldk.util.*;
+import java.util.Arrays;
+
+@SuppressWarnings("unchecked") // We correctly assign various generic arrays
+public class StaticPaymentOutputDescriptor extends CommonBase {
+       StaticPaymentOutputDescriptor(Object _dummy, long ptr) { super(ptr); }
+       @Override @SuppressWarnings("deprecation")
+       protected void finalize() throws Throwable {
+               super.finalize();
+               if (ptr != 0) { bindings.StaticPaymentOutputDescriptor_free(ptr); }
+       }
+
+       public OutPoint get_outpoint() {
+               long ret = bindings.StaticPaymentOutputDescriptor_get_outpoint(this.ptr);
+               OutPoint ret_hu_conv = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_outpoint(OutPoint val) {
+               bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
+               this.ptrs_to.add(val);
+       }
+
+       public void set_output(TxOut val) {
+               bindings.StaticPaymentOutputDescriptor_set_output(this.ptr, val.ptr);
+       }
+
+       public byte[] get_channel_keys_id() {
+               byte[] ret = bindings.StaticPaymentOutputDescriptor_get_channel_keys_id(this.ptr);
+               return ret;
+       }
+
+       public void set_channel_keys_id(byte[] val) {
+               bindings.StaticPaymentOutputDescriptor_set_channel_keys_id(this.ptr, val);
+       }
+
+       public long get_channel_value_satoshis() {
+               long ret = bindings.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this.ptr);
+               return ret;
+       }
+
+       public void set_channel_value_satoshis(long val) {
+               bindings.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this.ptr, val);
+       }
+
+       public static StaticPaymentOutputDescriptor constructor_new(OutPoint outpoint_arg, TxOut output_arg, byte[] channel_keys_id_arg, long channel_value_satoshis_arg) {
+               long ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, output_arg.ptr, channel_keys_id_arg, channel_value_satoshis_arg);
+               StaticPaymentOutputDescriptor ret_hu_conv = new StaticPaymentOutputDescriptor(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(outpoint_arg);
+               return ret_hu_conv;
+       }
+
+       public StaticPaymentOutputDescriptor clone() {
+               long ret = bindings.StaticPaymentOutputDescriptor_clone(this.ptr);
+               StaticPaymentOutputDescriptor ret_hu_conv = new StaticPaymentOutputDescriptor(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}
index 05e70350dec9d34f4fe88a2ffd076b3e0d8cab7b..f063faadfe20ca78851c89c29f5f56027cb7fc33 100644 (file)
@@ -14,13 +14,6 @@ public class TxCreationKeys extends CommonBase {
                if (ptr != 0) { bindings.TxCreationKeys_free(ptr); }
        }
 
-       public TxCreationKeys clone() {
-               long ret = bindings.TxCreationKeys_clone(this.ptr);
-               TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_per_commitment_point() {
                byte[] ret = bindings.TxCreationKeys_get_per_commitment_point(this.ptr);
                return ret;
@@ -73,27 +66,33 @@ public class TxCreationKeys extends CommonBase {
                return ret_hu_conv;
        }
 
+       public TxCreationKeys clone() {
+               long ret = bindings.TxCreationKeys_clone(this.ptr);
+               TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.TxCreationKeys_write(this.ptr);
                return ret;
        }
 
-       public static TxCreationKeys constructor_read(byte[] ser) {
+       public static Result_TxCreationKeysDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.TxCreationKeys_read(ser);
-               TxCreationKeys ret_hu_conv = new TxCreationKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_TxCreationKeysSecpErrorZ constructor_derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base) {
+       public static Result_TxCreationKeysErrorZ constructor_derive_new(byte[] per_commitment_point, byte[] broadcaster_delayed_payment_base, byte[] broadcaster_htlc_base, byte[] countersignatory_revocation_base, byte[] countersignatory_htlc_base) {
                long ret = bindings.TxCreationKeys_derive_new(per_commitment_point, broadcaster_delayed_payment_base, broadcaster_htlc_base, countersignatory_revocation_base, countersignatory_htlc_base);
-               Result_TxCreationKeysSecpErrorZ ret_hu_conv = Result_TxCreationKeysSecpErrorZ.constr_from_ptr(ret);
+               Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_TxCreationKeysSecpErrorZ constructor_from_channel_static_keys(byte[] per_commitment_point, ChannelPublicKeys broadcaster_keys, ChannelPublicKeys countersignatory_keys) {
+       public static Result_TxCreationKeysErrorZ constructor_from_channel_static_keys(byte[] per_commitment_point, ChannelPublicKeys broadcaster_keys, ChannelPublicKeys countersignatory_keys) {
                long ret = bindings.TxCreationKeys_from_channel_static_keys(per_commitment_point, broadcaster_keys == null ? 0 : broadcaster_keys.ptr & ~1, countersignatory_keys == null ? 0 : countersignatory_keys.ptr & ~1);
-               Result_TxCreationKeysSecpErrorZ ret_hu_conv = Result_TxCreationKeysSecpErrorZ.constr_from_ptr(ret);
+               Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(broadcaster_keys);
                ret_hu_conv.ptrs_to.add(countersignatory_keys);
                return ret_hu_conv;
index d4fa2aed2663a831ad5d2ff8cd30962d04f3732f..3404e76f7d8790a5598320c4d127dcc9e747ae3b 100644 (file)
@@ -14,13 +14,6 @@ public class UnsignedChannelAnnouncement extends CommonBase {
                if (ptr != 0) { bindings.UnsignedChannelAnnouncement_free(ptr); }
        }
 
-       public UnsignedChannelAnnouncement clone() {
-               long ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
-               UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelFeatures get_features() {
                long ret = bindings.UnsignedChannelAnnouncement_get_features(this.ptr);
                ChannelFeatures ret_hu_conv = new ChannelFeatures(null, ret);
@@ -31,14 +24,6 @@ public class UnsignedChannelAnnouncement extends CommonBase {
        public void set_features(ChannelFeatures val) {
                bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public byte[] get_chain_hash() {
@@ -95,6 +80,13 @@ public class UnsignedChannelAnnouncement extends CommonBase {
                bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val);
        }
 
+       public UnsignedChannelAnnouncement clone() {
+               long ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
+               UnsignedChannelAnnouncement ret_hu_conv = new UnsignedChannelAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UnsignedChannelAnnouncement_write(this.ptr);
                return ret;
index 86ad7499d2640004fff7e265466335981d419bb8..47a7687f5246afb77ccbd4f58279d3281b6f8f48 100644 (file)
@@ -14,13 +14,6 @@ public class UnsignedChannelUpdate extends CommonBase {
                if (ptr != 0) { bindings.UnsignedChannelUpdate_free(ptr); }
        }
 
-       public UnsignedChannelUpdate clone() {
-               long ret = bindings.UnsignedChannelUpdate_clone(this.ptr);
-               UnsignedChannelUpdate ret_hu_conv = new UnsignedChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_chain_hash() {
                byte[] ret = bindings.UnsignedChannelUpdate_get_chain_hash(this.ptr);
                return ret;
@@ -93,6 +86,13 @@ public class UnsignedChannelUpdate extends CommonBase {
                bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val);
        }
 
+       public UnsignedChannelUpdate clone() {
+               long ret = bindings.UnsignedChannelUpdate_clone(this.ptr);
+               UnsignedChannelUpdate ret_hu_conv = new UnsignedChannelUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UnsignedChannelUpdate_write(this.ptr);
                return ret;
index 964315caa910abdd91f9aaa0a2b210226604d7c3..606b202db2f45ad5b5e452a2bbbd9e3b6ce8d3bf 100644 (file)
@@ -14,13 +14,6 @@ public class UnsignedNodeAnnouncement extends CommonBase {
                if (ptr != 0) { bindings.UnsignedNodeAnnouncement_free(ptr); }
        }
 
-       public UnsignedNodeAnnouncement clone() {
-               long ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr);
-               UnsignedNodeAnnouncement ret_hu_conv = new UnsignedNodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public NodeFeatures get_features() {
                long ret = bindings.UnsignedNodeAnnouncement_get_features(this.ptr);
                NodeFeatures ret_hu_conv = new NodeFeatures(null, ret);
@@ -31,14 +24,6 @@ public class UnsignedNodeAnnouncement extends CommonBase {
        public void set_features(NodeFeatures val) {
                bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public int get_timestamp() {
@@ -78,10 +63,17 @@ public class UnsignedNodeAnnouncement extends CommonBase {
        }
 
        public void set_addresses(NetAddress[] val) {
-               bindings.UnsignedNodeAnnouncement_set_addresses(this.ptr, Arrays.stream(val).mapToLong(arr_conv_12 -> arr_conv_12.ptr).toArray());
+               bindings.UnsignedNodeAnnouncement_set_addresses(this.ptr, Arrays.stream(val).mapToLong(val_conv_12 -> val_conv_12.ptr).toArray());
                /* TODO 2 NetAddress  */;
        }
 
+       public UnsignedNodeAnnouncement clone() {
+               long ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr);
+               UnsignedNodeAnnouncement ret_hu_conv = new UnsignedNodeAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UnsignedNodeAnnouncement_write(this.ptr);
                return ret;
index 3f6643ce839b413362c4c0094b3ab5bb552b40f2..6e4afd246d46e7f3b7ac5b11900ea19b1ab486d4 100644 (file)
@@ -14,13 +14,6 @@ public class UpdateAddHTLC extends CommonBase {
                if (ptr != 0) { bindings.UpdateAddHTLC_free(ptr); }
        }
 
-       public UpdateAddHTLC clone() {
-               long ret = bindings.UpdateAddHTLC_clone(this.ptr);
-               UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
                return ret;
@@ -66,15 +59,21 @@ public class UpdateAddHTLC extends CommonBase {
                bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val);
        }
 
+       public UpdateAddHTLC clone() {
+               long ret = bindings.UpdateAddHTLC_clone(this.ptr);
+               UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UpdateAddHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateAddHTLC constructor_read(byte[] ser) {
+       public static Result_UpdateAddHTLCDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.UpdateAddHTLC_read(ser);
-               UpdateAddHTLC ret_hu_conv = new UpdateAddHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index b341d282b9c09db10e77d387ecc42760aa1e2fb8..355666153af51069af896d861a99b575db74b016 100644 (file)
@@ -14,13 +14,6 @@ public class UpdateFailHTLC extends CommonBase {
                if (ptr != 0) { bindings.UpdateFailHTLC_free(ptr); }
        }
 
-       public UpdateFailHTLC clone() {
-               long ret = bindings.UpdateFailHTLC_clone(this.ptr);
-               UpdateFailHTLC ret_hu_conv = new UpdateFailHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr);
                return ret;
@@ -39,15 +32,21 @@ public class UpdateFailHTLC extends CommonBase {
                bindings.UpdateFailHTLC_set_htlc_id(this.ptr, val);
        }
 
+       public UpdateFailHTLC clone() {
+               long ret = bindings.UpdateFailHTLC_clone(this.ptr);
+               UpdateFailHTLC ret_hu_conv = new UpdateFailHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UpdateFailHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFailHTLC constructor_read(byte[] ser) {
+       public static Result_UpdateFailHTLCDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.UpdateFailHTLC_read(ser);
-               UpdateFailHTLC ret_hu_conv = new UpdateFailHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 69e17531b94f87bae3951d7cbc1688d7dec0810b..0b28fc68a61b663f0b05ed0309b8288575d2f15b 100644 (file)
@@ -14,13 +14,6 @@ public class UpdateFailMalformedHTLC extends CommonBase {
                if (ptr != 0) { bindings.UpdateFailMalformedHTLC_free(ptr); }
        }
 
-       public UpdateFailMalformedHTLC clone() {
-               long ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr);
-               UpdateFailMalformedHTLC ret_hu_conv = new UpdateFailMalformedHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr);
                return ret;
@@ -48,15 +41,21 @@ public class UpdateFailMalformedHTLC extends CommonBase {
                bindings.UpdateFailMalformedHTLC_set_failure_code(this.ptr, val);
        }
 
+       public UpdateFailMalformedHTLC clone() {
+               long ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr);
+               UpdateFailMalformedHTLC ret_hu_conv = new UpdateFailMalformedHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UpdateFailMalformedHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFailMalformedHTLC constructor_read(byte[] ser) {
+       public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.UpdateFailMalformedHTLC_read(ser);
-               UpdateFailMalformedHTLC ret_hu_conv = new UpdateFailMalformedHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a939f3f18021f9971a109503dbb0b67f3c861c03..fa186fb4fdb4bc2a46bf2cac2660e0ea493f7e9f 100644 (file)
@@ -14,13 +14,6 @@ public class UpdateFee extends CommonBase {
                if (ptr != 0) { bindings.UpdateFee_free(ptr); }
        }
 
-       public UpdateFee clone() {
-               long ret = bindings.UpdateFee_clone(this.ptr);
-               UpdateFee ret_hu_conv = new UpdateFee(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.UpdateFee_get_channel_id(this.ptr);
                return ret;
@@ -46,15 +39,21 @@ public class UpdateFee extends CommonBase {
                return ret_hu_conv;
        }
 
+       public UpdateFee clone() {
+               long ret = bindings.UpdateFee_clone(this.ptr);
+               UpdateFee ret_hu_conv = new UpdateFee(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UpdateFee_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFee constructor_read(byte[] ser) {
+       public static Result_UpdateFeeDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.UpdateFee_read(ser);
-               UpdateFee ret_hu_conv = new UpdateFee(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index e31af1b6a309c37ce9382aba45f6506da668e24b..966392bdc871f263ef1815938dcaba7b0b91ae8c 100644 (file)
@@ -14,13 +14,6 @@ public class UpdateFulfillHTLC extends CommonBase {
                if (ptr != 0) { bindings.UpdateFulfillHTLC_free(ptr); }
        }
 
-       public UpdateFulfillHTLC clone() {
-               long ret = bindings.UpdateFulfillHTLC_clone(this.ptr);
-               UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public byte[] get_channel_id() {
                byte[] ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr);
                return ret;
@@ -55,15 +48,21 @@ public class UpdateFulfillHTLC extends CommonBase {
                return ret_hu_conv;
        }
 
+       public UpdateFulfillHTLC clone() {
+               long ret = bindings.UpdateFulfillHTLC_clone(this.ptr);
+               UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public byte[] write() {
                byte[] ret = bindings.UpdateFulfillHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFulfillHTLC constructor_read(byte[] ser) {
+       public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_read(byte[] ser) {
                long ret = bindings.UpdateFulfillHTLC_read(ser);
-               UpdateFulfillHTLC ret_hu_conv = new UpdateFulfillHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index ccf01fef1de68719763acd4a191ab9b5ffc1461a..5629008e6347e324992ccc90696c7fdc03e78ec8 100644 (file)
@@ -14,13 +14,6 @@ public class UserConfig extends CommonBase {
                if (ptr != 0) { bindings.UserConfig_free(ptr); }
        }
 
-       public UserConfig clone() {
-               long ret = bindings.UserConfig_clone(this.ptr);
-               UserConfig ret_hu_conv = new UserConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelHandshakeConfig get_own_channel_config() {
                long ret = bindings.UserConfig_get_own_channel_config(this.ptr);
                ChannelHandshakeConfig ret_hu_conv = new ChannelHandshakeConfig(null, ret);
@@ -67,6 +60,13 @@ public class UserConfig extends CommonBase {
                return ret_hu_conv;
        }
 
+       public UserConfig clone() {
+               long ret = bindings.UserConfig_clone(this.ptr);
+               UserConfig ret_hu_conv = new UserConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static UserConfig constructor_default() {
                long ret = bindings.UserConfig_default();
                UserConfig ret_hu_conv = new UserConfig(null, ret);
index 8f2f7f34d7a93e0df397492528c3bcb81ad636c2..3a1bcbfe8e62df9678a4f39ff4209f176a16e799 100644 (file)
@@ -11,7 +11,7 @@ public class UtilMethods {
        }
 
        public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_BlockHashChannelManagerZ_read(byte[] ser, KeysInterface arg_keys_manager, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
-               long ret = bindings.C2Tuple_BlockHashChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_keys_manager == null ? 0 : arg_keys_manager.ptr, arg_fee_estimator == null ? 0 : arg_fee_estimator.ptr, arg_chain_monitor == null ? 0 : arg_chain_monitor.ptr, arg_tx_broadcaster == null ? 0 : arg_tx_broadcaster.ptr, arg_logger == null ? 0 : arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr & ~1, Arrays.stream(arg_channel_monitors).mapToLong(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray()));
+               long ret = bindings.C2Tuple_BlockHashChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_keys_manager == null ? 0 : arg_keys_manager.ptr, arg_fee_estimator == null ? 0 : arg_fee_estimator.ptr, arg_chain_monitor == null ? 0 : arg_chain_monitor.ptr, arg_tx_broadcaster == null ? 0 : arg_tx_broadcaster.ptr, arg_logger == null ? 0 : arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr & ~1, Arrays.stream(arg_channel_monitors).mapToLong(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr & ~1).toArray()));
                Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(arg_keys_manager);
                ret_hu_conv.ptrs_to.add(arg_fee_estimator);
index db7d43923d4c6c08759e37a6783ef3948afba94d..c9b156fbd5146997e446ae25ae8fc4c74e3bc479 100644 (file)
@@ -48,7 +48,7 @@ public class Watch extends CommonBase {
                        }
                        @Override public long[] release_pending_monitor_events() {
                                MonitorEvent[] ret = arg.release_pending_monitor_events();
-                               long[] result = Arrays.stream(ret).mapToLong(arr_conv_14 -> arr_conv_14 == null ? 0 : arr_conv_14.ptr & ~1).toArray();
+                               long[] result = Arrays.stream(ret).mapToLong(ret_conv_14 -> ret_conv_14.ptr).toArray();
                                /* TODO 2 MonitorEvent  */;
                                return result;
                        }
@@ -73,14 +73,14 @@ public class Watch extends CommonBase {
 
        public MonitorEvent[] release_pending_monitor_events() {
                long[] ret = bindings.Watch_release_pending_monitor_events(this.ptr);
-               MonitorEvent[] arr_conv_14_arr = new MonitorEvent[ret.length];
+               MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret.length];
                for (int o = 0; o < ret.length; o++) {
-                       long arr_conv_14 = ret[o];
-                       MonitorEvent arr_conv_14_hu_conv = new MonitorEvent(null, arr_conv_14);
-                       arr_conv_14_hu_conv.ptrs_to.add(this);
-                       arr_conv_14_arr[o] = arr_conv_14_hu_conv;
+                       long ret_conv_14 = ret[o];
+                       MonitorEvent ret_conv_14_hu_conv = MonitorEvent.constr_from_ptr(ret_conv_14);
+                       ret_conv_14_hu_conv.ptrs_to.add(this);
+                       ret_conv_14_arr[o] = ret_conv_14_hu_conv;
                }
-               return arr_conv_14_arr;
+               return ret_conv_14_arr;
        }
 
 }
index 4de0f334832a2424e82b5c293cfa3c1c8b121113..c00a6981a7a3a7e1a17defe586aaa48d4f74d713 100644 (file)
@@ -112,15 +112,15 @@ static inline jstring str_ref_to_java(JNIEnv *env, const char* chars, size_t len
        FREE(err_buf);
        return err_conv;
 }
-static jclass arr_of_B_clz = NULL;
 static jclass arr_of_J_clz = NULL;
+static jclass arr_of_B_clz = NULL;
 JNIEXPORT void Java_org_ldk_impl_bindings_init_1class_1cache(JNIEnv * env, jclass clz) {
-       arr_of_B_clz = (*env)->FindClass(env, "[B");
-       CHECK(arr_of_B_clz != NULL);
-       arr_of_B_clz = (*env)->NewGlobalRef(env, arr_of_B_clz);
        arr_of_J_clz = (*env)->FindClass(env, "[J");
        CHECK(arr_of_J_clz != NULL);
        arr_of_J_clz = (*env)->NewGlobalRef(env, arr_of_J_clz);
+       arr_of_B_clz = (*env)->FindClass(env, "[B");
+       CHECK(arr_of_B_clz != NULL);
+       arr_of_B_clz = (*env)->NewGlobalRef(env, arr_of_B_clz);
 }
 static inline struct LDKThirtyTwoBytes ThirtyTwoBytes_clone(const struct LDKThirtyTwoBytes *orig) { struct LDKThirtyTwoBytes ret; memcpy(ret.data, orig->data, 32); return ret; }
 static inline LDKAccessError LDKAccessError_from_java(JNIEnv *env, jclass clz) {
@@ -270,6 +270,7 @@ static inline LDKNetwork LDKNetwork_from_java(JNIEnv *env, jclass clz) {
                case 0: return LDKNetwork_Bitcoin;
                case 1: return LDKNetwork_Testnet;
                case 2: return LDKNetwork_Regtest;
+               case 3: return LDKNetwork_Signet;
        }
        abort();
 }
@@ -277,6 +278,7 @@ static jclass LDKNetwork_class = NULL;
 static jfieldID LDKNetwork_LDKNetwork_Bitcoin = NULL;
 static jfieldID LDKNetwork_LDKNetwork_Testnet = NULL;
 static jfieldID LDKNetwork_LDKNetwork_Regtest = NULL;
+static jfieldID LDKNetwork_LDKNetwork_Signet = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_enums_LDKNetwork_init (JNIEnv *env, jclass clz) {
        LDKNetwork_class = (*env)->NewGlobalRef(env, clz);
        CHECK(LDKNetwork_class != NULL);
@@ -286,6 +288,8 @@ JNIEXPORT void JNICALL Java_org_ldk_enums_LDKNetwork_init (JNIEnv *env, jclass c
        CHECK(LDKNetwork_LDKNetwork_Testnet != NULL);
        LDKNetwork_LDKNetwork_Regtest = (*env)->GetStaticFieldID(env, LDKNetwork_class, "LDKNetwork_Regtest", "Lorg/ldk/enums/LDKNetwork;");
        CHECK(LDKNetwork_LDKNetwork_Regtest != NULL);
+       LDKNetwork_LDKNetwork_Signet = (*env)->GetStaticFieldID(env, LDKNetwork_class, "LDKNetwork_Signet", "Lorg/ldk/enums/LDKNetwork;");
+       CHECK(LDKNetwork_LDKNetwork_Signet != NULL);
 }
 static inline jclass LDKNetwork_to_java(JNIEnv *env, LDKNetwork val) {
        switch (val) {
@@ -295,6 +299,8 @@ static inline jclass LDKNetwork_to_java(JNIEnv *env, LDKNetwork val) {
                        return (*env)->GetStaticObjectField(env, LDKNetwork_class, LDKNetwork_LDKNetwork_Testnet);
                case LDKNetwork_Regtest:
                        return (*env)->GetStaticObjectField(env, LDKNetwork_class, LDKNetwork_LDKNetwork_Regtest);
+               case LDKNetwork_Signet:
+                       return (*env)->GetStaticObjectField(env, LDKNetwork_class, LDKNetwork_LDKNetwork_Signet);
                default: abort();
        }
 }
@@ -308,8 +314,8 @@ static inline LDKSecp256k1Error LDKSecp256k1Error_from_java(JNIEnv *env, jclass
                case 4: return LDKSecp256k1Error_InvalidSecretKey;
                case 5: return LDKSecp256k1Error_InvalidRecoveryId;
                case 6: return LDKSecp256k1Error_InvalidTweak;
-               case 7: return LDKSecp256k1Error_NotEnoughMemory;
-               case 8: return LDKSecp256k1Error_CallbackPanicked;
+               case 7: return LDKSecp256k1Error_TweakCheckFailed;
+               case 8: return LDKSecp256k1Error_NotEnoughMemory;
        }
        abort();
 }
@@ -321,8 +327,8 @@ static jfieldID LDKSecp256k1Error_LDKSecp256k1Error_InvalidSignature = NULL;
 static jfieldID LDKSecp256k1Error_LDKSecp256k1Error_InvalidSecretKey = NULL;
 static jfieldID LDKSecp256k1Error_LDKSecp256k1Error_InvalidRecoveryId = NULL;
 static jfieldID LDKSecp256k1Error_LDKSecp256k1Error_InvalidTweak = NULL;
+static jfieldID LDKSecp256k1Error_LDKSecp256k1Error_TweakCheckFailed = NULL;
 static jfieldID LDKSecp256k1Error_LDKSecp256k1Error_NotEnoughMemory = NULL;
-static jfieldID LDKSecp256k1Error_LDKSecp256k1Error_CallbackPanicked = NULL;
 JNIEXPORT void JNICALL Java_org_ldk_enums_LDKSecp256k1Error_init (JNIEnv *env, jclass clz) {
        LDKSecp256k1Error_class = (*env)->NewGlobalRef(env, clz);
        CHECK(LDKSecp256k1Error_class != NULL);
@@ -340,10 +346,10 @@ JNIEXPORT void JNICALL Java_org_ldk_enums_LDKSecp256k1Error_init (JNIEnv *env, j
        CHECK(LDKSecp256k1Error_LDKSecp256k1Error_InvalidRecoveryId != NULL);
        LDKSecp256k1Error_LDKSecp256k1Error_InvalidTweak = (*env)->GetStaticFieldID(env, LDKSecp256k1Error_class, "LDKSecp256k1Error_InvalidTweak", "Lorg/ldk/enums/LDKSecp256k1Error;");
        CHECK(LDKSecp256k1Error_LDKSecp256k1Error_InvalidTweak != NULL);
+       LDKSecp256k1Error_LDKSecp256k1Error_TweakCheckFailed = (*env)->GetStaticFieldID(env, LDKSecp256k1Error_class, "LDKSecp256k1Error_TweakCheckFailed", "Lorg/ldk/enums/LDKSecp256k1Error;");
+       CHECK(LDKSecp256k1Error_LDKSecp256k1Error_TweakCheckFailed != NULL);
        LDKSecp256k1Error_LDKSecp256k1Error_NotEnoughMemory = (*env)->GetStaticFieldID(env, LDKSecp256k1Error_class, "LDKSecp256k1Error_NotEnoughMemory", "Lorg/ldk/enums/LDKSecp256k1Error;");
        CHECK(LDKSecp256k1Error_LDKSecp256k1Error_NotEnoughMemory != NULL);
-       LDKSecp256k1Error_LDKSecp256k1Error_CallbackPanicked = (*env)->GetStaticFieldID(env, LDKSecp256k1Error_class, "LDKSecp256k1Error_CallbackPanicked", "Lorg/ldk/enums/LDKSecp256k1Error;");
-       CHECK(LDKSecp256k1Error_LDKSecp256k1Error_CallbackPanicked != NULL);
 }
 static inline jclass LDKSecp256k1Error_to_java(JNIEnv *env, LDKSecp256k1Error val) {
        switch (val) {
@@ -361,10 +367,10 @@ static inline jclass LDKSecp256k1Error_to_java(JNIEnv *env, LDKSecp256k1Error va
                        return (*env)->GetStaticObjectField(env, LDKSecp256k1Error_class, LDKSecp256k1Error_LDKSecp256k1Error_InvalidRecoveryId);
                case LDKSecp256k1Error_InvalidTweak:
                        return (*env)->GetStaticObjectField(env, LDKSecp256k1Error_class, LDKSecp256k1Error_LDKSecp256k1Error_InvalidTweak);
+               case LDKSecp256k1Error_TweakCheckFailed:
+                       return (*env)->GetStaticObjectField(env, LDKSecp256k1Error_class, LDKSecp256k1Error_LDKSecp256k1Error_TweakCheckFailed);
                case LDKSecp256k1Error_NotEnoughMemory:
                        return (*env)->GetStaticObjectField(env, LDKSecp256k1Error_class, LDKSecp256k1Error_LDKSecp256k1Error_NotEnoughMemory);
-               case LDKSecp256k1Error_CallbackPanicked:
-                       return (*env)->GetStaticObjectField(env, LDKSecp256k1Error_class, LDKSecp256k1Error_LDKSecp256k1Error_CallbackPanicked);
                default: abort();
        }
 }
@@ -389,103 +395,261 @@ static inline LDKCVec_u8Z CVec_u8Z_clone(const LDKCVec_u8Z *orig) {
        memcpy(ret.data, orig->data, sizeof(int8_t) * ret.datalen);
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
-       LDKC2Tuple_u64u64Z* ret = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       ret->a = a;
-       ret->b = b;
-       return (long)ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_SecretKeyErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
-       return tuple->a;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SecretKeyErrorZ *val = (LDKCResult_SecretKeyErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       int8_tArray res_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, res_arr, 0, 32, (*val->contents.result).bytes);
+       return res_arr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
-       return tuple->b;
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SecretKeyErrorZ *val = (LDKCResult_SecretKeyErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
+       return err_conv;
 }
-static jclass LDKSpendableOutputDescriptor_StaticOutput_class = NULL;
-static jmethodID LDKSpendableOutputDescriptor_StaticOutput_meth = NULL;
-static jclass LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class = NULL;
-static jmethodID LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth = NULL;
-static jclass LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class = NULL;
-static jmethodID LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendableOutputDescriptor_init (JNIEnv *env, jclass clz) {
-       LDKSpendableOutputDescriptor_StaticOutput_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$StaticOutput;"));
-       CHECK(LDKSpendableOutputDescriptor_StaticOutput_class != NULL);
-       LDKSpendableOutputDescriptor_StaticOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticOutput_class, "<init>", "(JJ)V");
-       CHECK(LDKSpendableOutputDescriptor_StaticOutput_meth != NULL);
-       LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$DynamicOutputP2WSH;"));
-       CHECK(LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class != NULL);
-       LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class, "<init>", "(J[BSJJ[B)V");
-       CHECK(LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth != NULL);
-       LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$StaticOutputCounterpartyPayment;"));
-       CHECK(LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class != NULL);
-       LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class, "<init>", "(JJJ)V");
-       CHECK(LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth != NULL);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_PublicKeyErrorZ*)arg)->result_ok;
 }
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
-       switch(obj->tag) {
-               case LDKSpendableOutputDescriptor_StaticOutput: {
-                       LDKOutPoint outpoint_var = obj->static_output.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       long output_ref = ((long)&obj->static_output.output) | 1;
-                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutput_class, LDKSpendableOutputDescriptor_StaticOutput_meth, outpoint_ref, (long)output_ref);
-               }
-               case LDKSpendableOutputDescriptor_DynamicOutputP2WSH: {
-                       LDKOutPoint outpoint_var = obj->dynamic_output_p2wsh.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       int8_tArray per_commitment_point_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, per_commitment_point_arr, 0, 33, obj->dynamic_output_p2wsh.per_commitment_point.compressed_form);
-                       long output_ref = ((long)&obj->dynamic_output_p2wsh.output) | 1;
-                       long key_derivation_params_ref = (long)(&obj->dynamic_output_p2wsh.key_derivation_params) | 1;
-                       int8_tArray revocation_pubkey_arr = (*env)->NewByteArray(env, 33);
-                       (*env)->SetByteArrayRegion(env, revocation_pubkey_arr, 0, 33, obj->dynamic_output_p2wsh.revocation_pubkey.compressed_form);
-                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_class, LDKSpendableOutputDescriptor_DynamicOutputP2WSH_meth, outpoint_ref, per_commitment_point_arr, obj->dynamic_output_p2wsh.to_self_delay, (long)output_ref, key_derivation_params_ref, revocation_pubkey_arr);
-               }
-               case LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment: {
-                       LDKOutPoint outpoint_var = obj->static_output_counterparty_payment.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       long output_ref = ((long)&obj->static_output_counterparty_payment.output) | 1;
-                       long key_derivation_params_ref = (long)(&obj->static_output_counterparty_payment.key_derivation_params) | 1;
-                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_class, LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment_meth, outpoint_ref, (long)output_ref, key_derivation_params_ref);
-               }
-               default: abort();
-       }
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PublicKeyErrorZ *val = (LDKCResult_PublicKeyErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       int8_tArray res_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, res_arr, 0, 33, (*val->contents.result).compressed_form);
+       return res_arr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1SpendableOutputDescriptorZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_SpendableOutputDescriptorZ *ret = MALLOC(sizeof(LDKCVec_SpendableOutputDescriptorZ), "LDKCVec_SpendableOutputDescriptorZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * ret->datalen, "LDKCVec_SpendableOutputDescriptorZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKSpendableOutputDescriptor arr_elem_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PublicKeyErrorZ *val = (LDKCResult_PublicKeyErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
+       return err_conv;
 }
-static inline LDKCVec_SpendableOutputDescriptorZ CVec_SpendableOutputDescriptorZ_clone(const LDKCVec_SpendableOutputDescriptorZ *orig) {
-       LDKCVec_SpendableOutputDescriptorZ ret = { .data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * orig->datalen, "LDKCVec_SpendableOutputDescriptorZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = SpendableOutputDescriptor_clone(&orig->data[i]);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_TxCreationKeysDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TxCreationKeysDecodeErrorZ *val = (LDKCResult_TxCreationKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTxCreationKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TxCreationKeysDecodeErrorZ *val = (LDKCResult_TxCreationKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelPublicKeysDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ *val = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelPublicKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ *val = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_TxCreationKeysErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TxCreationKeysErrorZ *val = (LDKCResult_TxCreationKeysErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTxCreationKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TxCreationKeysErrorZ *val = (LDKCResult_TxCreationKeysErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
+       return err_conv;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *val = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHTLCOutputInCommitment res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *val = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCounterpartyChannelTransactionParameters res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelTransactionParametersDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelTransactionParameters res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ *val = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHolderCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ *val = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *val = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKBuiltCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *val = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ *val = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ *val = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_TrustedCommitmentTransactionNoneZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTrustedCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CVec_SignatureZNoneZ*)arg)->result_ok;
+}
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCVec_SignatureZ res_var = (*val->contents.result);
+       jobjectArray res_arr = (*env)->NewObjectArray(env, res_var.datalen, arr_of_B_clz, NULL);
+       ;
+       for (size_t i = 0; i < res_var.datalen; i++) {
+               int8_tArray res_conv_8_arr = (*env)->NewByteArray(env, 64);
+               (*env)->SetByteArrayRegion(env, res_conv_8_arr, 0, 64, res_var.data[i].compact_form);
+               (*env)->SetObjectArrayElement(env, res_arr, i, res_conv_8_arr);
        }
-       return ret;
+       return res_arr;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
 }
 static jclass LDKErrorAction_DisconnectPeer_class = NULL;
 static jmethodID LDKErrorAction_DisconnectPeer_meth = NULL;
@@ -888,167 +1052,77 @@ static inline LDKCVec_MessageSendEventZ CVec_MessageSendEventZ_clone(const LDKCV
        }
        return ret;
 }
-static jclass LDKEvent_FundingGenerationReady_class = NULL;
-static jmethodID LDKEvent_FundingGenerationReady_meth = NULL;
-static jclass LDKEvent_FundingBroadcastSafe_class = NULL;
-static jmethodID LDKEvent_FundingBroadcastSafe_meth = NULL;
-static jclass LDKEvent_PaymentReceived_class = NULL;
-static jmethodID LDKEvent_PaymentReceived_meth = NULL;
-static jclass LDKEvent_PaymentSent_class = NULL;
-static jmethodID LDKEvent_PaymentSent_meth = NULL;
-static jclass LDKEvent_PaymentFailed_class = NULL;
-static jmethodID LDKEvent_PaymentFailed_meth = NULL;
-static jclass LDKEvent_PendingHTLCsForwardable_class = NULL;
-static jmethodID LDKEvent_PendingHTLCsForwardable_meth = NULL;
-static jclass LDKEvent_SpendableOutputs_class = NULL;
-static jmethodID LDKEvent_SpendableOutputs_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *env, jclass clz) {
-       LDKEvent_FundingGenerationReady_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$FundingGenerationReady;"));
-       CHECK(LDKEvent_FundingGenerationReady_class != NULL);
-       LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "([BJ[BJ)V");
-       CHECK(LDKEvent_FundingGenerationReady_meth != NULL);
-       LDKEvent_FundingBroadcastSafe_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$FundingBroadcastSafe;"));
-       CHECK(LDKEvent_FundingBroadcastSafe_class != NULL);
-       LDKEvent_FundingBroadcastSafe_meth = (*env)->GetMethodID(env, LDKEvent_FundingBroadcastSafe_class, "<init>", "(JJ)V");
-       CHECK(LDKEvent_FundingBroadcastSafe_meth != NULL);
-       LDKEvent_PaymentReceived_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PaymentReceived;"));
-       CHECK(LDKEvent_PaymentReceived_class != NULL);
-       LDKEvent_PaymentReceived_meth = (*env)->GetMethodID(env, LDKEvent_PaymentReceived_class, "<init>", "([B[BJ)V");
-       CHECK(LDKEvent_PaymentReceived_meth != NULL);
-       LDKEvent_PaymentSent_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PaymentSent;"));
-       CHECK(LDKEvent_PaymentSent_class != NULL);
-       LDKEvent_PaymentSent_meth = (*env)->GetMethodID(env, LDKEvent_PaymentSent_class, "<init>", "([B)V");
-       CHECK(LDKEvent_PaymentSent_meth != NULL);
-       LDKEvent_PaymentFailed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PaymentFailed;"));
-       CHECK(LDKEvent_PaymentFailed_class != NULL);
-       LDKEvent_PaymentFailed_meth = (*env)->GetMethodID(env, LDKEvent_PaymentFailed_class, "<init>", "([BZ)V");
-       CHECK(LDKEvent_PaymentFailed_meth != NULL);
-       LDKEvent_PendingHTLCsForwardable_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PendingHTLCsForwardable;"));
-       CHECK(LDKEvent_PendingHTLCsForwardable_class != NULL);
-       LDKEvent_PendingHTLCsForwardable_meth = (*env)->GetMethodID(env, LDKEvent_PendingHTLCsForwardable_class, "<init>", "(J)V");
-       CHECK(LDKEvent_PendingHTLCsForwardable_meth != NULL);
-       LDKEvent_SpendableOutputs_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$SpendableOutputs;"));
-       CHECK(LDKEvent_SpendableOutputs_class != NULL);
-       LDKEvent_SpendableOutputs_meth = (*env)->GetMethodID(env, LDKEvent_SpendableOutputs_class, "<init>", "([J)V");
-       CHECK(LDKEvent_SpendableOutputs_meth != NULL);
-}
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKEvent *obj = (LDKEvent*)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);
-                       LDKCVec_u8Z output_script_var = obj->funding_generation_ready.output_script;
-                       int8_tArray output_script_arr = (*env)->NewByteArray(env, output_script_var.datalen);
-                       (*env)->SetByteArrayRegion(env, output_script_arr, 0, output_script_var.datalen, output_script_var.data);
-                       return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_arr, obj->funding_generation_ready.channel_value_satoshis, output_script_arr, obj->funding_generation_ready.user_channel_id);
-               }
-               case LDKEvent_FundingBroadcastSafe: {
-                       LDKOutPoint funding_txo_var = obj->funding_broadcast_safe.funding_txo;
-                       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long funding_txo_ref = (long)funding_txo_var.inner & ~1;
-                       return (*env)->NewObject(env, LDKEvent_FundingBroadcastSafe_class, LDKEvent_FundingBroadcastSafe_meth, funding_txo_ref, obj->funding_broadcast_safe.user_channel_id);
-               }
-               case LDKEvent_PaymentReceived: {
-                       int8_tArray payment_hash_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->payment_received.payment_hash.data);
-                       int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->payment_received.payment_secret.data);
-                       return (*env)->NewObject(env, LDKEvent_PaymentReceived_class, LDKEvent_PaymentReceived_meth, payment_hash_arr, payment_secret_arr, obj->payment_received.amt);
-               }
-               case LDKEvent_PaymentSent: {
-                       int8_tArray payment_preimage_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, payment_preimage_arr, 0, 32, obj->payment_sent.payment_preimage.data);
-                       return (*env)->NewObject(env, LDKEvent_PaymentSent_class, LDKEvent_PaymentSent_meth, payment_preimage_arr);
-               }
-               case LDKEvent_PaymentFailed: {
-                       int8_tArray payment_hash_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->payment_failed.payment_hash.data);
-                       return (*env)->NewObject(env, LDKEvent_PaymentFailed_class, LDKEvent_PaymentFailed_meth, payment_hash_arr, obj->payment_failed.rejected_by_dest);
-               }
-               case LDKEvent_PendingHTLCsForwardable: {
-                       return (*env)->NewObject(env, LDKEvent_PendingHTLCsForwardable_class, LDKEvent_PendingHTLCsForwardable_meth, obj->pending_htl_cs_forwardable.time_forwardable);
-               }
-               case LDKEvent_SpendableOutputs: {
-                       LDKCVec_SpendableOutputDescriptorZ outputs_var = obj->spendable_outputs.outputs;
-                       int64_tArray outputs_arr = (*env)->NewLongArray(env, outputs_var.datalen);
-                       int64_t *outputs_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, outputs_arr, NULL);
-                       for (size_t b = 0; b < outputs_var.datalen; b++) {
-                               long arr_conv_27_ref = ((long)&outputs_var.data[b]) | 1;
-                               outputs_arr_ptr[b] = arr_conv_27_ref;
-                       }
-                       (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0);
-                       return (*env)->NewObject(env, LDKEvent_SpendableOutputs_class, LDKEvent_SpendableOutputs_meth, outputs_arr);
-               }
-               default: abort();
-       }
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_boolLightningErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1EventZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_EventZ *ret = MALLOC(sizeof(LDKCVec_EventZ), "LDKCVec_EventZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKEvent) * ret->datalen, "LDKCVec_EventZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKEvent arr_elem_conv = *(LDKEvent*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
 }
-static inline LDKCVec_EventZ CVec_EventZ_clone(const LDKCVec_EventZ *orig) {
-       LDKCVec_EventZ ret = { .data = MALLOC(sizeof(LDKEvent) * orig->datalen, "LDKCVec_EventZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = Event_clone(&orig->data[i]);
-       }
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKLightningError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
-       LDKC2Tuple_usizeTransactionZ* ret = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       ret->a = a;
-       LDKTransaction b_ref;
-       b_ref.datalen = (*env)->GetArrayLength(env, b);
-       b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
-       (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
-       b_ref.data_is_owned = false;
-       ret->b = b_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_t c) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = ChannelAnnouncement_clone(&a_conv);
+       ret->a = a_conv;
+       LDKChannelUpdate b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelUpdate_clone(&b_conv);
+       ret->b = b_conv;
+       LDKChannelUpdate c_conv;
+       c_conv.inner = (void*)(c & (~1));
+       c_conv.is_owned = (c & 1) || (c == 0);
+       c_conv = ChannelUpdate_clone(&c_conv);
+       ret->c = c_conv;
        return (long)ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
-       return tuple->a;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelAnnouncement a_var = tuple->a;
+       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long a_ref = (long)a_var.inner & ~1;
+       return a_ref;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
-       LDKTransaction b_var = tuple->b;
-       int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
-       (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
-       return b_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelUpdate b_var = tuple->b;
+       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long b_ref = (long)b_var.inner & ~1;
+       return b_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTransactionZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelUpdate c_var = tuple->c;
+       CHECK((((long)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long c_ref = (long)c_var.inner & ~1;
+       return c_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ) * ret->datalen, "LDKCVec_C2Tuple_usizeTransactionZZ Data");
+               ret->data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * ret->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Data");
                int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
                for (size_t i = 0; i < ret->datalen; i++) {
                        int64_t arr_elem = java_elems[i];
-                       LDKC2Tuple_usizeTransactionZ arr_elem_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_elem) & ~1);
+                       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_elem_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_elem) & ~1);
                        FREE((void*)arr_elem);
                        ret->data[i] = arr_elem_conv;
                }
@@ -1056,732 +1130,3103 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTran
        }
        return (long)ret;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NoneChannelMonitorUpdateErrZ*)arg)->result_ok;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
-}
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       jclass err_conv = LDKChannelMonitorUpdateErr_to_java(env, (*val->contents.err));
-       return err_conv;
+static inline LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_clone(const LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *orig) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * orig->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(&orig->data[i]);
+       }
+       return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MonitorEventZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_MonitorEventZ *ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ");
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NodeAnnouncementZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_NodeAnnouncementZ *ret = MALLOC(sizeof(LDKCVec_NodeAnnouncementZ), "LDKCVec_NodeAnnouncementZ");
        ret->datalen = (*env)->GetArrayLength(env, elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKMonitorEvent) * ret->datalen, "LDKCVec_MonitorEventZ Data");
+               ret->data = MALLOC(sizeof(LDKNodeAnnouncement) * ret->datalen, "LDKCVec_NodeAnnouncementZ Data");
                int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
                for (size_t i = 0; i < ret->datalen; i++) {
                        int64_t arr_elem = java_elems[i];
-                       LDKMonitorEvent arr_elem_conv;
+                       LDKNodeAnnouncement arr_elem_conv;
                        arr_elem_conv.inner = (void*)(arr_elem & (~1));
                        arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = MonitorEvent_clone(&arr_elem_conv);
+                       arr_elem_conv = NodeAnnouncement_clone(&arr_elem_conv);
                        ret->data[i] = arr_elem_conv;
                }
                (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
        }
        return (long)ret;
 }
-static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_MonitorEventZ *orig) {
-       LDKCVec_MonitorEventZ ret = { .data = MALLOC(sizeof(LDKMonitorEvent) * orig->datalen, "LDKCVec_MonitorEventZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_NodeAnnouncementZ CVec_NodeAnnouncementZ_clone(const LDKCVec_NodeAnnouncementZ *orig) {
+       LDKCVec_NodeAnnouncementZ ret = { .data = MALLOC(sizeof(LDKNodeAnnouncement) * orig->datalen, "LDKCVec_NodeAnnouncementZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = MonitorEvent_clone(&orig->data[i]);
+               ret.data[i] = NodeAnnouncement_clone(&orig->data[i]);
        }
        return ret;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NoneLightningErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ *val = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(arg & ~1);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKChannelMonitorUpdate res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+       return *val->contents.result;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ *val = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
+       LDKLightningError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NoneMonitorUpdateErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg)->result_ok;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneMonitorUpdateErrorZ *val = (LDKCResult_NoneMonitorUpdateErrorZ*)(arg & ~1);
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKCVec_u8Z res_var = (*val->contents.result);
+       int8_tArray res_arr = (*env)->NewByteArray(env, res_var.datalen);
+       (*env)->SetByteArrayRegion(env, res_arr, 0, res_var.datalen, res_var.data);
+       return res_arr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneMonitorUpdateErrorZ *val = (LDKCResult_NoneMonitorUpdateErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKMonitorUpdateError err_var = (*val->contents.err);
+       LDKPeerHandleError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
-       LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       LDKOutPoint a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = OutPoint_clone(&a_conv);
-       ret->a = a_conv;
-       LDKCVec_u8Z b_ref;
-       b_ref.datalen = (*env)->GetArrayLength(env, b);
-       b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
-       ret->b = b_ref;
-       return (long)ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NonePeerHandleErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKOutPoint a_var = tuple->a;
-       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long a_ref = (long)a_var.inner & ~1;
-       return a_ref;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKCVec_u8Z b_var = tuple->b;
-       int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
-       (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
-       return b_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKPeerHandleError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1new(JNIEnv *env, jclass clz, int32_t a, int64_t b) {
-       LDKC2Tuple_u32TxOutZ* ret = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       ret->a = a;
-       LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
-       FREE((void*)b);
-       ret->b = b_conv;
-       return (long)ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_boolPeerHandleErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
-       return tuple->a;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
-       long b_ref = ((long)&tuple->b) | 1;
-       return (long)b_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKPeerHandleError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32TxOutZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ) * ret->datalen, "LDKCVec_C2Tuple_u32TxOutZZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKC2Tuple_u32TxOutZ arr_elem_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_InitFeaturesDecodeErrorZ*)arg)->result_ok;
 }
-static inline LDKCVec_C2Tuple_u32TxOutZZ CVec_C2Tuple_u32TxOutZZ_clone(const LDKCVec_C2Tuple_u32TxOutZZ *orig) {
-       LDKCVec_C2Tuple_u32TxOutZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ) * orig->datalen, "LDKCVec_C2Tuple_u32TxOutZZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = C2Tuple_u32TxOutZ_clone(&orig->data[i]);
-       }
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InitFeaturesDecodeErrorZ *val = (LDKCResult_InitFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKInitFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       LDKThirtyTwoBytes a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 32);
-       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
-       ret->a = a_ref;
-       LDKCVec_C2Tuple_u32TxOutZZ b_constr;
-       b_constr.datalen = (*env)->GetArrayLength(env, b);
-       if (b_constr.datalen > 0)
-               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
-       else
-               b_constr.data = NULL;
-       int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t a = 0; a < b_constr.datalen; a++) {
-               int64_t arr_conv_26 = b_vals[a];
-               LDKC2Tuple_u32TxOutZ arr_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)arr_conv_26) & ~1);
-               FREE((void*)arr_conv_26);
-               b_constr.data[a] = arr_conv_26_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
-       ret->b = b_constr;
-       return (long)ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InitFeaturesDecodeErrorZ *val = (LDKCResult_InitFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NodeFeaturesDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
-       LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
-       int64_tArray b_arr = (*env)->NewLongArray(env, b_var.datalen);
-       int64_t *b_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, b_arr, NULL);
-       for (size_t a = 0; a < b_var.datalen; a++) {
-               long arr_conv_26_ref = (long)(&b_var.data[a]) | 1;
-               b_arr_ptr[a] = arr_conv_26_ref;
-       }
-       (*env)->ReleasePrimitiveArrayCritical(env, b_arr, b_arr_ptr, 0);
-       return b_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeFeaturesDecodeErrorZ *val = (LDKCResult_NodeFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ) * ret->datalen, "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ arr_elem_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeFeaturesDecodeErrorZ *val = (LDKCResult_NodeFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, jobjectArray b) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ* ret = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
-       LDKSignature a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 64);
-       (*env)->GetByteArrayRegion(env, a, 0, 64, a_ref.compact_form);
-       ret->a = a_ref;
-       LDKCVec_SignatureZ b_constr;
-       b_constr.datalen = (*env)->GetArrayLength(env, b);
-       if (b_constr.datalen > 0)
-               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
-       else
-               b_constr.data = NULL;
-       for (size_t i = 0; i < b_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, b, i);
-               LDKSignature arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
-               b_constr.data[i] = arr_conv_8_ref;
-       }
-       ret->b = b_constr;
-       return (long)ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelFeaturesDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 64, tuple->a.compact_form);
-       return a_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelFeaturesDecodeErrorZ *val = (LDKCResult_ChannelFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       LDKCVec_SignatureZ b_var = tuple->b;
-       jobjectArray b_arr = (*env)->NewObjectArray(env, b_var.datalen, arr_of_B_clz, NULL);
-       ;
-       for (size_t i = 0; i < b_var.datalen; i++) {
-               int8_tArray arr_conv_8_arr = (*env)->NewByteArray(env, 64);
-               (*env)->SetByteArrayRegion(env, arr_conv_8_arr, 0, 64, b_var.data[i].compact_form);
-               (*env)->SetObjectArrayElement(env, b_arr, i, arr_conv_8_arr);
-       }
-       return b_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelFeaturesDecodeErrorZ *val = (LDKCResult_ChannelFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelConfigDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelConfigDecodeErrorZ *val = (LDKCResult_ChannelConfigDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       long res_ref = (long)(&(*val->contents.result)) | 1;
+       LDKChannelConfig res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelConfigDecodeErrorZ *val = (LDKCResult_ChannelConfigDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       return *val->contents.err;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_SignatureNoneZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_DirectionalChannelInfoDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SignatureNoneZ *val = (LDKCResult_SignatureNoneZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ *val = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       int8_tArray res_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, res_arr, 0, 64, (*val->contents.result).compact_form);
-       return res_arr;
+       LDKDirectionalChannelInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SignatureNoneZ *val = (LDKCResult_SignatureNoneZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ *val = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       return *val->contents.err;
-}
-typedef struct LDKChannelKeys_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID get_per_commitment_point_meth;
-       jmethodID release_commitment_secret_meth;
-       jmethodID key_derivation_params_meth;
-       jmethodID sign_counterparty_commitment_meth;
-       jmethodID sign_holder_commitment_and_htlcs_meth;
-       jmethodID sign_justice_transaction_meth;
-       jmethodID sign_counterparty_htlc_transaction_meth;
-       jmethodID sign_closing_transaction_meth;
-       jmethodID sign_channel_announcement_meth;
-       jmethodID ready_channel_meth;
-       jmethodID write_meth;
-} LDKChannelKeys_JCalls;
-static void LDKChannelKeys_JCalls_free(void* this_arg) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
-       }
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-LDKPublicKey get_per_commitment_point_jcall(const void* this_arg, uint64_t idx) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       int8_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_per_commitment_point_meth, idx);
-       LDKPublicKey arg_ref;
-       CHECK((*env)->GetArrayLength(env, arg) == 33);
-       (*env)->GetByteArrayRegion(env, arg, 0, 33, arg_ref.compressed_form);
-       return arg_ref;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelInfoDecodeErrorZ*)arg)->result_ok;
 }
-LDKThirtyTwoBytes release_commitment_secret_jcall(const void* this_arg, uint64_t idx) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       int8_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->release_commitment_secret_meth, idx);
-       LDKThirtyTwoBytes arg_ref;
-       CHECK((*env)->GetArrayLength(env, arg) == 32);
-       (*env)->GetByteArrayRegion(env, arg, 0, 32, arg_ref.data);
-       return arg_ref;
-}
-LDKC2Tuple_u64u64Z key_derivation_params_jcall(const void* this_arg) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKC2Tuple_u64u64Z* ret = (LDKC2Tuple_u64u64Z*)(*env)->CallLongMethod(env, obj, j_calls->key_derivation_params_meth);
-       LDKC2Tuple_u64u64Z ret_conv = *(LDKC2Tuple_u64u64Z*)(((uint64_t)ret) & ~1);
-       ret_conv = C2Tuple_u64u64Z_clone((LDKC2Tuple_u64u64Z*)ret);
-       return ret_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelInfoDecodeErrorZ *val = (LDKCResult_ChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment_jcall(const void* this_arg, const LDKCommitmentTransaction * commitment_tx) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKCommitmentTransaction commitment_tx_var = *commitment_tx;
-       commitment_tx_var = CommitmentTransaction_clone(commitment_tx);
-       CHECK((((long)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long commitment_tx_ref = (long)commitment_tx_var.inner;
-       if (commitment_tx_var.is_owned) {
-               commitment_tx_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_counterparty_commitment_meth, commitment_tx_ref);
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)ret);
-       return ret_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelInfoDecodeErrorZ *val = (LDKCResult_ChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs_jcall(const void* this_arg, const LDKHolderCommitmentTransaction * commitment_tx) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKHolderCommitmentTransaction commitment_tx_var = *commitment_tx;
-       commitment_tx_var = HolderCommitmentTransaction_clone(commitment_tx);
-       CHECK((((long)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long commitment_tx_ref = (long)commitment_tx_var.inner;
-       if (commitment_tx_var.is_owned) {
-               commitment_tx_ref |= 1;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_RoutingFeesDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKRoutingFees res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+static jclass LDKNetAddress_IPv4_class = NULL;
+static jmethodID LDKNetAddress_IPv4_meth = NULL;
+static jclass LDKNetAddress_IPv6_class = NULL;
+static jmethodID LDKNetAddress_IPv6_meth = NULL;
+static jclass LDKNetAddress_OnionV2_class = NULL;
+static jmethodID LDKNetAddress_OnionV2_meth = NULL;
+static jclass LDKNetAddress_OnionV3_class = NULL;
+static jmethodID LDKNetAddress_OnionV3_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNetAddress_init (JNIEnv *env, jclass clz) {
+       LDKNetAddress_IPv4_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$IPv4;"));
+       CHECK(LDKNetAddress_IPv4_class != NULL);
+       LDKNetAddress_IPv4_meth = (*env)->GetMethodID(env, LDKNetAddress_IPv4_class, "<init>", "([BS)V");
+       CHECK(LDKNetAddress_IPv4_meth != NULL);
+       LDKNetAddress_IPv6_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$IPv6;"));
+       CHECK(LDKNetAddress_IPv6_class != NULL);
+       LDKNetAddress_IPv6_meth = (*env)->GetMethodID(env, LDKNetAddress_IPv6_class, "<init>", "([BS)V");
+       CHECK(LDKNetAddress_IPv6_meth != NULL);
+       LDKNetAddress_OnionV2_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$OnionV2;"));
+       CHECK(LDKNetAddress_OnionV2_class != NULL);
+       LDKNetAddress_OnionV2_meth = (*env)->GetMethodID(env, LDKNetAddress_OnionV2_class, "<init>", "([BS)V");
+       CHECK(LDKNetAddress_OnionV2_meth != NULL);
+       LDKNetAddress_OnionV3_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$OnionV3;"));
+       CHECK(LDKNetAddress_OnionV3_class != NULL);
+       LDKNetAddress_OnionV3_meth = (*env)->GetMethodID(env, LDKNetAddress_OnionV3_class, "<init>", "([BSBS)V");
+       CHECK(LDKNetAddress_OnionV3_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNetAddress_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKNetAddress *obj = (LDKNetAddress*)ptr;
+       switch(obj->tag) {
+               case LDKNetAddress_IPv4: {
+                       int8_tArray addr_arr = (*env)->NewByteArray(env, 4);
+                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 4, obj->i_pv4.addr.data);
+                       return (*env)->NewObject(env, LDKNetAddress_IPv4_class, LDKNetAddress_IPv4_meth, addr_arr, obj->i_pv4.port);
+               }
+               case LDKNetAddress_IPv6: {
+                       int8_tArray addr_arr = (*env)->NewByteArray(env, 16);
+                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 16, obj->i_pv6.addr.data);
+                       return (*env)->NewObject(env, LDKNetAddress_IPv6_class, LDKNetAddress_IPv6_meth, addr_arr, obj->i_pv6.port);
+               }
+               case LDKNetAddress_OnionV2: {
+                       int8_tArray addr_arr = (*env)->NewByteArray(env, 10);
+                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 10, obj->onion_v2.addr.data);
+                       return (*env)->NewObject(env, LDKNetAddress_OnionV2_class, LDKNetAddress_OnionV2_meth, addr_arr, obj->onion_v2.port);
+               }
+               case LDKNetAddress_OnionV3: {
+                       int8_tArray ed25519_pubkey_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, ed25519_pubkey_arr, 0, 32, obj->onion_v3.ed25519_pubkey.data);
+                       return (*env)->NewObject(env, LDKNetAddress_OnionV3_class, LDKNetAddress_OnionV3_meth, ed25519_pubkey_arr, obj->onion_v3.checksum, obj->onion_v3.version, obj->onion_v3.port);
+               }
+               default: abort();
        }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_holder_commitment_and_htlcs_meth, commitment_tx_ref);
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)ret);
-       return ret_conv;
 }
-LDKCResult_SignatureNoneZ sign_justice_transaction_jcall(const void* this_arg, LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (* per_commitment_key)[32], const LDKHTLCOutputInCommitment * htlc) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKTransaction justice_tx_var = justice_tx;
-       int8_tArray justice_tx_arr = (*env)->NewByteArray(env, justice_tx_var.datalen);
-       (*env)->SetByteArrayRegion(env, justice_tx_arr, 0, justice_tx_var.datalen, justice_tx_var.data);
-       Transaction_free(justice_tx_var);
-       int8_tArray per_commitment_key_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, per_commitment_key_arr, 0, 32, *per_commitment_key);
-       LDKHTLCOutputInCommitment htlc_var = *htlc;
-       htlc_var = HTLCOutputInCommitment_clone(htlc);
-       CHECK((((long)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long htlc_ref = (long)htlc_var.inner;
-       if (htlc_var.is_owned) {
-               htlc_ref |= 1;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NetAddressZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_NetAddressZ *ret = MALLOC(sizeof(LDKCVec_NetAddressZ), "LDKCVec_NetAddressZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKNetAddress) * ret->datalen, "LDKCVec_NetAddressZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKNetAddress arr_elem_conv = *(LDKNetAddress*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
        }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_justice_transaction_meth, justice_tx_arr, input, amount, per_commitment_key_arr, htlc_ref);
-       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
-       return ret_conv;
+       return (long)ret;
 }
-LDKCResult_SignatureNoneZ sign_counterparty_htlc_transaction_jcall(const void* this_arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment * htlc) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKTransaction htlc_tx_var = htlc_tx;
-       int8_tArray htlc_tx_arr = (*env)->NewByteArray(env, htlc_tx_var.datalen);
-       (*env)->SetByteArrayRegion(env, htlc_tx_arr, 0, htlc_tx_var.datalen, htlc_tx_var.data);
-       Transaction_free(htlc_tx_var);
-       int8_tArray per_commitment_point_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, per_commitment_point_arr, 0, 33, per_commitment_point.compressed_form);
-       LDKHTLCOutputInCommitment htlc_var = *htlc;
-       htlc_var = HTLCOutputInCommitment_clone(htlc);
-       CHECK((((long)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long htlc_ref = (long)htlc_var.inner;
-       if (htlc_var.is_owned) {
-               htlc_ref |= 1;
+static inline LDKCVec_NetAddressZ CVec_NetAddressZ_clone(const LDKCVec_NetAddressZ *orig) {
+       LDKCVec_NetAddressZ ret = { .data = MALLOC(sizeof(LDKNetAddress) * orig->datalen, "LDKCVec_NetAddressZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = NetAddress_clone(&orig->data[i]);
        }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_counterparty_htlc_transaction_meth, htlc_tx_arr, input, amount, per_commitment_point_arr, htlc_ref);
-       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
-       return ret_conv;
+       return ret;
 }
-LDKCResult_SignatureNoneZ sign_closing_transaction_jcall(const void* this_arg, LDKTransaction closing_tx) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKTransaction closing_tx_var = closing_tx;
-       int8_tArray closing_tx_arr = (*env)->NewByteArray(env, closing_tx_var.datalen);
-       (*env)->SetByteArrayRegion(env, closing_tx_arr, 0, closing_tx_var.datalen, closing_tx_var.data);
-       Transaction_free(closing_tx_var);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_closing_transaction_meth, closing_tx_arr);
-       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
-       return ret_conv;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)arg)->result_ok;
 }
-LDKCResult_SignatureNoneZ sign_channel_announcement_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement * msg) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKUnsignedChannelAnnouncement msg_var = *msg;
-       msg_var = UnsignedChannelAnnouncement_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeAnnouncementInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1u64Z_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_u64Z *ret = MALLOC(sizeof(LDKCVec_u64Z), "LDKCVec_u64Z");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(uint64_t) * ret->datalen, "LDKCVec_u64Z Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       ret->data[i] = java_elems[i];
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
        }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_channel_announcement_meth, msg_ref);
-       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
-       return ret_conv;
+       return (long)ret;
+}
+static inline LDKCVec_u64Z CVec_u64Z_clone(const LDKCVec_u64Z *orig) {
+       LDKCVec_u64Z ret = { .data = MALLOC(sizeof(int64_t) * orig->datalen, "LDKCVec_u64Z clone bytes"), .datalen = orig->datalen };
+       memcpy(ret.data, orig->data, sizeof(int64_t) * ret.datalen);
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NodeInfoDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NetworkGraphDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNetworkGraph res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
+       LDKC2Tuple_usizeTransactionZ* ret = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       ret->a = a;
+       LDKTransaction b_ref;
+       b_ref.datalen = (*env)->GetArrayLength(env, b);
+       b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
+       b_ref.data_is_owned = false;
+       ret->b = b_ref;
+       return (long)ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+       return tuple->a;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+       LDKTransaction b_var = tuple->b;
+       int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
+       (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
+       return b_arr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTransactionZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ) * ret->datalen, "LDKCVec_C2Tuple_usizeTransactionZZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKC2Tuple_usizeTransactionZ arr_elem_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NoneChannelMonitorUpdateErrZ*)arg)->result_ok;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       jclass err_conv = LDKChannelMonitorUpdateErr_to_java(env, (*val->contents.err));
+       return err_conv;
+}
+static jclass LDKMonitorEvent_HTLCEvent_class = NULL;
+static jmethodID LDKMonitorEvent_HTLCEvent_meth = NULL;
+static jclass LDKMonitorEvent_CommitmentTxBroadcasted_class = NULL;
+static jmethodID LDKMonitorEvent_CommitmentTxBroadcasted_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init (JNIEnv *env, jclass clz) {
+       LDKMonitorEvent_HTLCEvent_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKMonitorEvent$HTLCEvent;"));
+       CHECK(LDKMonitorEvent_HTLCEvent_class != NULL);
+       LDKMonitorEvent_HTLCEvent_meth = (*env)->GetMethodID(env, LDKMonitorEvent_HTLCEvent_class, "<init>", "()V");
+       CHECK(LDKMonitorEvent_HTLCEvent_meth != NULL);
+       LDKMonitorEvent_CommitmentTxBroadcasted_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKMonitorEvent$CommitmentTxBroadcasted;"));
+       CHECK(LDKMonitorEvent_CommitmentTxBroadcasted_class != NULL);
+       LDKMonitorEvent_CommitmentTxBroadcasted_meth = (*env)->GetMethodID(env, LDKMonitorEvent_CommitmentTxBroadcasted_class, "<init>", "()V");
+       CHECK(LDKMonitorEvent_CommitmentTxBroadcasted_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKMonitorEvent *obj = (LDKMonitorEvent*)ptr;
+       switch(obj->tag) {
+               case LDKMonitorEvent_HTLCEvent: {
+                       return (*env)->NewObject(env, LDKMonitorEvent_HTLCEvent_class, LDKMonitorEvent_HTLCEvent_meth);
+               }
+               case LDKMonitorEvent_CommitmentTxBroadcasted: {
+                       return (*env)->NewObject(env, LDKMonitorEvent_CommitmentTxBroadcasted_class, LDKMonitorEvent_CommitmentTxBroadcasted_meth);
+               }
+               default: abort();
+       }
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MonitorEventZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_MonitorEventZ *ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKMonitorEvent) * ret->datalen, "LDKCVec_MonitorEventZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKMonitorEvent arr_elem_conv = *(LDKMonitorEvent*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_MonitorEventZ *orig) {
+       LDKCVec_MonitorEventZ ret = { .data = MALLOC(sizeof(LDKMonitorEvent) * orig->datalen, "LDKCVec_MonitorEventZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = MonitorEvent_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static jclass LDKSpendableOutputDescriptor_StaticOutput_class = NULL;
+static jmethodID LDKSpendableOutputDescriptor_StaticOutput_meth = NULL;
+static jclass LDKSpendableOutputDescriptor_DelayedPaymentOutput_class = NULL;
+static jmethodID LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth = NULL;
+static jclass LDKSpendableOutputDescriptor_StaticPaymentOutput_class = NULL;
+static jmethodID LDKSpendableOutputDescriptor_StaticPaymentOutput_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKSpendableOutputDescriptor_init (JNIEnv *env, jclass clz) {
+       LDKSpendableOutputDescriptor_StaticOutput_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$StaticOutput;"));
+       CHECK(LDKSpendableOutputDescriptor_StaticOutput_class != NULL);
+       LDKSpendableOutputDescriptor_StaticOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticOutput_class, "<init>", "(JJ)V");
+       CHECK(LDKSpendableOutputDescriptor_StaticOutput_meth != NULL);
+       LDKSpendableOutputDescriptor_DelayedPaymentOutput_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$DelayedPaymentOutput;"));
+       CHECK(LDKSpendableOutputDescriptor_DelayedPaymentOutput_class != NULL);
+       LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_DelayedPaymentOutput_class, "<init>", "()V");
+       CHECK(LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth != NULL);
+       LDKSpendableOutputDescriptor_StaticPaymentOutput_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKSpendableOutputDescriptor$StaticPaymentOutput;"));
+       CHECK(LDKSpendableOutputDescriptor_StaticPaymentOutput_class != NULL);
+       LDKSpendableOutputDescriptor_StaticPaymentOutput_meth = (*env)->GetMethodID(env, LDKSpendableOutputDescriptor_StaticPaymentOutput_class, "<init>", "()V");
+       CHECK(LDKSpendableOutputDescriptor_StaticPaymentOutput_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
+       switch(obj->tag) {
+               case LDKSpendableOutputDescriptor_StaticOutput: {
+                       LDKOutPoint outpoint_var = obj->static_output.outpoint;
+                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long outpoint_ref = (long)outpoint_var.inner & ~1;
+                       long output_ref = ((long)&obj->static_output.output) | 1;
+                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticOutput_class, LDKSpendableOutputDescriptor_StaticOutput_meth, outpoint_ref, (long)output_ref);
+               }
+               case LDKSpendableOutputDescriptor_DelayedPaymentOutput: {
+                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_DelayedPaymentOutput_class, LDKSpendableOutputDescriptor_DelayedPaymentOutput_meth);
+               }
+               case LDKSpendableOutputDescriptor_StaticPaymentOutput: {
+                       return (*env)->NewObject(env, LDKSpendableOutputDescriptor_StaticPaymentOutput_class, LDKSpendableOutputDescriptor_StaticPaymentOutput_meth);
+               }
+               default: abort();
+       }
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1SpendableOutputDescriptorZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_SpendableOutputDescriptorZ *ret = MALLOC(sizeof(LDKCVec_SpendableOutputDescriptorZ), "LDKCVec_SpendableOutputDescriptorZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * ret->datalen, "LDKCVec_SpendableOutputDescriptorZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKSpendableOutputDescriptor arr_elem_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_SpendableOutputDescriptorZ CVec_SpendableOutputDescriptorZ_clone(const LDKCVec_SpendableOutputDescriptorZ *orig) {
+       LDKCVec_SpendableOutputDescriptorZ ret = { .data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * orig->datalen, "LDKCVec_SpendableOutputDescriptorZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = SpendableOutputDescriptor_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static jclass LDKEvent_FundingGenerationReady_class = NULL;
+static jmethodID LDKEvent_FundingGenerationReady_meth = NULL;
+static jclass LDKEvent_FundingBroadcastSafe_class = NULL;
+static jmethodID LDKEvent_FundingBroadcastSafe_meth = NULL;
+static jclass LDKEvent_PaymentReceived_class = NULL;
+static jmethodID LDKEvent_PaymentReceived_meth = NULL;
+static jclass LDKEvent_PaymentSent_class = NULL;
+static jmethodID LDKEvent_PaymentSent_meth = NULL;
+static jclass LDKEvent_PaymentFailed_class = NULL;
+static jmethodID LDKEvent_PaymentFailed_meth = NULL;
+static jclass LDKEvent_PendingHTLCsForwardable_class = NULL;
+static jmethodID LDKEvent_PendingHTLCsForwardable_meth = NULL;
+static jclass LDKEvent_SpendableOutputs_class = NULL;
+static jmethodID LDKEvent_SpendableOutputs_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKEvent_init (JNIEnv *env, jclass clz) {
+       LDKEvent_FundingGenerationReady_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$FundingGenerationReady;"));
+       CHECK(LDKEvent_FundingGenerationReady_class != NULL);
+       LDKEvent_FundingGenerationReady_meth = (*env)->GetMethodID(env, LDKEvent_FundingGenerationReady_class, "<init>", "([BJ[BJ)V");
+       CHECK(LDKEvent_FundingGenerationReady_meth != NULL);
+       LDKEvent_FundingBroadcastSafe_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$FundingBroadcastSafe;"));
+       CHECK(LDKEvent_FundingBroadcastSafe_class != NULL);
+       LDKEvent_FundingBroadcastSafe_meth = (*env)->GetMethodID(env, LDKEvent_FundingBroadcastSafe_class, "<init>", "(JJ)V");
+       CHECK(LDKEvent_FundingBroadcastSafe_meth != NULL);
+       LDKEvent_PaymentReceived_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PaymentReceived;"));
+       CHECK(LDKEvent_PaymentReceived_class != NULL);
+       LDKEvent_PaymentReceived_meth = (*env)->GetMethodID(env, LDKEvent_PaymentReceived_class, "<init>", "([B[BJ)V");
+       CHECK(LDKEvent_PaymentReceived_meth != NULL);
+       LDKEvent_PaymentSent_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PaymentSent;"));
+       CHECK(LDKEvent_PaymentSent_class != NULL);
+       LDKEvent_PaymentSent_meth = (*env)->GetMethodID(env, LDKEvent_PaymentSent_class, "<init>", "([B)V");
+       CHECK(LDKEvent_PaymentSent_meth != NULL);
+       LDKEvent_PaymentFailed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PaymentFailed;"));
+       CHECK(LDKEvent_PaymentFailed_class != NULL);
+       LDKEvent_PaymentFailed_meth = (*env)->GetMethodID(env, LDKEvent_PaymentFailed_class, "<init>", "([BZ)V");
+       CHECK(LDKEvent_PaymentFailed_meth != NULL);
+       LDKEvent_PendingHTLCsForwardable_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$PendingHTLCsForwardable;"));
+       CHECK(LDKEvent_PendingHTLCsForwardable_class != NULL);
+       LDKEvent_PendingHTLCsForwardable_meth = (*env)->GetMethodID(env, LDKEvent_PendingHTLCsForwardable_class, "<init>", "(J)V");
+       CHECK(LDKEvent_PendingHTLCsForwardable_meth != NULL);
+       LDKEvent_SpendableOutputs_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKEvent$SpendableOutputs;"));
+       CHECK(LDKEvent_SpendableOutputs_class != NULL);
+       LDKEvent_SpendableOutputs_meth = (*env)->GetMethodID(env, LDKEvent_SpendableOutputs_class, "<init>", "([J)V");
+       CHECK(LDKEvent_SpendableOutputs_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKEvent *obj = (LDKEvent*)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);
+                       LDKCVec_u8Z output_script_var = obj->funding_generation_ready.output_script;
+                       int8_tArray output_script_arr = (*env)->NewByteArray(env, output_script_var.datalen);
+                       (*env)->SetByteArrayRegion(env, output_script_arr, 0, output_script_var.datalen, output_script_var.data);
+                       return (*env)->NewObject(env, LDKEvent_FundingGenerationReady_class, LDKEvent_FundingGenerationReady_meth, temporary_channel_id_arr, obj->funding_generation_ready.channel_value_satoshis, output_script_arr, obj->funding_generation_ready.user_channel_id);
+               }
+               case LDKEvent_FundingBroadcastSafe: {
+                       LDKOutPoint funding_txo_var = obj->funding_broadcast_safe.funding_txo;
+                       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long funding_txo_ref = (long)funding_txo_var.inner & ~1;
+                       return (*env)->NewObject(env, LDKEvent_FundingBroadcastSafe_class, LDKEvent_FundingBroadcastSafe_meth, funding_txo_ref, obj->funding_broadcast_safe.user_channel_id);
+               }
+               case LDKEvent_PaymentReceived: {
+                       int8_tArray payment_hash_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->payment_received.payment_hash.data);
+                       int8_tArray payment_secret_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, payment_secret_arr, 0, 32, obj->payment_received.payment_secret.data);
+                       return (*env)->NewObject(env, LDKEvent_PaymentReceived_class, LDKEvent_PaymentReceived_meth, payment_hash_arr, payment_secret_arr, obj->payment_received.amt);
+               }
+               case LDKEvent_PaymentSent: {
+                       int8_tArray payment_preimage_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, payment_preimage_arr, 0, 32, obj->payment_sent.payment_preimage.data);
+                       return (*env)->NewObject(env, LDKEvent_PaymentSent_class, LDKEvent_PaymentSent_meth, payment_preimage_arr);
+               }
+               case LDKEvent_PaymentFailed: {
+                       int8_tArray payment_hash_arr = (*env)->NewByteArray(env, 32);
+                       (*env)->SetByteArrayRegion(env, payment_hash_arr, 0, 32, obj->payment_failed.payment_hash.data);
+                       return (*env)->NewObject(env, LDKEvent_PaymentFailed_class, LDKEvent_PaymentFailed_meth, payment_hash_arr, obj->payment_failed.rejected_by_dest);
+               }
+               case LDKEvent_PendingHTLCsForwardable: {
+                       return (*env)->NewObject(env, LDKEvent_PendingHTLCsForwardable_class, LDKEvent_PendingHTLCsForwardable_meth, obj->pending_htl_cs_forwardable.time_forwardable);
+               }
+               case LDKEvent_SpendableOutputs: {
+                       LDKCVec_SpendableOutputDescriptorZ outputs_var = obj->spendable_outputs.outputs;
+                       int64_tArray outputs_arr = (*env)->NewLongArray(env, outputs_var.datalen);
+                       int64_t *outputs_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, outputs_arr, NULL);
+                       for (size_t b = 0; b < outputs_var.datalen; b++) {
+                               long outputs_conv_27_ref = ((long)&outputs_var.data[b]) | 1;
+                               outputs_arr_ptr[b] = outputs_conv_27_ref;
+                       }
+                       (*env)->ReleasePrimitiveArrayCritical(env, outputs_arr, outputs_arr_ptr, 0);
+                       return (*env)->NewObject(env, LDKEvent_SpendableOutputs_class, LDKEvent_SpendableOutputs_meth, outputs_arr);
+               }
+               default: abort();
+       }
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1EventZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_EventZ *ret = MALLOC(sizeof(LDKCVec_EventZ), "LDKCVec_EventZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKEvent) * ret->datalen, "LDKCVec_EventZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKEvent arr_elem_conv = *(LDKEvent*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_EventZ CVec_EventZ_clone(const LDKCVec_EventZ *orig) {
+       LDKCVec_EventZ ret = { .data = MALLOC(sizeof(LDKEvent) * orig->datalen, "LDKCVec_EventZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = Event_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_OutPointDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OutPointDecodeErrorZ *val = (LDKCResult_OutPointDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKOutPoint res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OutPointDecodeErrorZ *val = (LDKCResult_OutPointDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ *val = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelMonitorUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ *val = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_HTLCUpdateDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HTLCUpdateDecodeErrorZ *val = (LDKCResult_HTLCUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHTLCUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_HTLCUpdateDecodeErrorZ *val = (LDKCResult_HTLCUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NoneMonitorUpdateErrorZ*)arg)->result_ok;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneMonitorUpdateErrorZ *val = (LDKCResult_NoneMonitorUpdateErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneMonitorUpdateErrorZ *val = (LDKCResult_NoneMonitorUpdateErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKMonitorUpdateError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
+       LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       LDKOutPoint a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = OutPoint_clone(&a_conv);
+       ret->a = a_conv;
+       LDKCVec_u8Z b_ref;
+       b_ref.datalen = (*env)->GetArrayLength(env, b);
+       b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
+       ret->b = b_ref;
+       return (long)ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
+       LDKOutPoint a_var = tuple->a;
+       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long a_ref = (long)a_var.inner & ~1;
+       return a_ref;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
+       LDKCVec_u8Z b_var = tuple->b;
+       int8_tArray b_arr = (*env)->NewByteArray(env, b_var.datalen);
+       (*env)->SetByteArrayRegion(env, b_arr, 0, b_var.datalen, b_var.data);
+       return b_arr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1new(JNIEnv *env, jclass clz, int32_t a, int64_t b) {
+       LDKC2Tuple_u32TxOutZ* ret = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       ret->a = a;
+       LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
+       FREE((void*)b);
+       ret->b = b_conv;
+       return (long)ret;
+}
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+       return tuple->a;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+       long b_ref = ((long)&tuple->b) | 1;
+       return (long)b_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32TxOutZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ) * ret->datalen, "LDKCVec_C2Tuple_u32TxOutZZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKC2Tuple_u32TxOutZ arr_elem_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_C2Tuple_u32TxOutZZ CVec_C2Tuple_u32TxOutZZ_clone(const LDKCVec_C2Tuple_u32TxOutZZ *orig) {
+       LDKCVec_C2Tuple_u32TxOutZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ) * orig->datalen, "LDKCVec_C2Tuple_u32TxOutZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C2Tuple_u32TxOutZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       LDKThirtyTwoBytes a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 32);
+       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+       ret->a = a_ref;
+       LDKCVec_C2Tuple_u32TxOutZZ b_constr;
+       b_constr.datalen = (*env)->GetArrayLength(env, b);
+       if (b_constr.datalen > 0)
+               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
+       else
+               b_constr.data = NULL;
+       int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
+       for (size_t a = 0; a < b_constr.datalen; a++) {
+               int64_t b_conv_26 = b_vals[a];
+               LDKC2Tuple_u32TxOutZ b_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1);
+               FREE((void*)b_conv_26);
+               b_constr.data[a] = b_conv_26_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
+       ret->b = b_constr;
+       return (long)ret;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
+       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
+       return a_arr;
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
+       LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
+       int64_tArray b_arr = (*env)->NewLongArray(env, b_var.datalen);
+       int64_t *b_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, b_arr, NULL);
+       for (size_t a = 0; a < b_var.datalen; a++) {
+               long b_conv_26_ref = (long)(&b_var.data[a]) | 1;
+               b_arr_ptr[a] = b_conv_26_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, b_arr, b_arr_ptr, 0);
+       return b_arr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ) * ret->datalen, "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ arr_elem_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, jobjectArray b) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ* ret = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       LDKSignature a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 64);
+       (*env)->GetByteArrayRegion(env, a, 0, 64, a_ref.compact_form);
+       ret->a = a_ref;
+       LDKCVec_SignatureZ b_constr;
+       b_constr.datalen = (*env)->GetArrayLength(env, b);
+       if (b_constr.datalen > 0)
+               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
+       else
+               b_constr.data = NULL;
+       for (size_t i = 0; i < b_constr.datalen; i++) {
+               int8_tArray b_conv_8 = (*env)->GetObjectArrayElement(env, b, i);
+               LDKSignature b_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, b_conv_8) == 64);
+               (*env)->GetByteArrayRegion(env, b_conv_8, 0, 64, b_conv_8_ref.compact_form);
+               b_constr.data[i] = b_conv_8_ref;
+       }
+       ret->b = b_constr;
+       return (long)ret;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
+       int8_tArray a_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, a_arr, 0, 64, tuple->a.compact_form);
+       return a_arr;
+}
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
+       LDKCVec_SignatureZ b_var = tuple->b;
+       jobjectArray b_arr = (*env)->NewObjectArray(env, b_var.datalen, arr_of_B_clz, NULL);
+       ;
+       for (size_t i = 0; i < b_var.datalen; i++) {
+               int8_tArray b_conv_8_arr = (*env)->NewByteArray(env, 64);
+               (*env)->SetByteArrayRegion(env, b_conv_8_arr, 0, 64, b_var.data[i].compact_form);
+               (*env)->SetObjectArrayElement(env, b_arr, i, b_conv_8_arr);
+       }
+       return b_arr;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = (long)(&(*val->contents.result)) | 1;
+       return res_ref;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_SignatureNoneZ*)arg)->result_ok;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SignatureNoneZ *val = (LDKCResult_SignatureNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       int8_tArray res_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, res_arr, 0, 64, (*val->contents.result).compact_form);
+       return res_arr;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SignatureNoneZ *val = (LDKCResult_SignatureNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+typedef struct LDKSign_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID get_per_commitment_point_meth;
+       jmethodID release_commitment_secret_meth;
+       jmethodID channel_keys_id_meth;
+       jmethodID sign_counterparty_commitment_meth;
+       jmethodID sign_holder_commitment_and_htlcs_meth;
+       jmethodID sign_justice_transaction_meth;
+       jmethodID sign_counterparty_htlc_transaction_meth;
+       jmethodID sign_closing_transaction_meth;
+       jmethodID sign_channel_announcement_meth;
+       jmethodID ready_channel_meth;
+       jmethodID write_meth;
+} LDKSign_JCalls;
+static void LDKSign_JCalls_free(void* this_arg) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
+}
+LDKPublicKey get_per_commitment_point_jcall(const void* this_arg, uint64_t idx) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->get_per_commitment_point_meth, idx);
+       LDKPublicKey ret_ref;
+       CHECK((*env)->GetArrayLength(env, ret) == 33);
+       (*env)->GetByteArrayRegion(env, ret, 0, 33, ret_ref.compressed_form);
+       return ret_ref;
+}
+LDKThirtyTwoBytes release_commitment_secret_jcall(const void* this_arg, uint64_t idx) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->release_commitment_secret_meth, idx);
+       LDKThirtyTwoBytes ret_ref;
+       CHECK((*env)->GetArrayLength(env, ret) == 32);
+       (*env)->GetByteArrayRegion(env, ret, 0, 32, ret_ref.data);
+       return ret_ref;
+}
+LDKThirtyTwoBytes channel_keys_id_jcall(const void* this_arg) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->channel_keys_id_meth);
+       LDKThirtyTwoBytes ret_ref;
+       CHECK((*env)->GetArrayLength(env, ret) == 32);
+       (*env)->GetByteArrayRegion(env, ret, 0, 32, ret_ref.data);
+       return ret_ref;
+}
+LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment_jcall(const void* this_arg, const LDKCommitmentTransaction * commitment_tx) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKCommitmentTransaction commitment_tx_var = *commitment_tx;
+       commitment_tx_var = CommitmentTransaction_clone(commitment_tx);
+       CHECK((((long)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long commitment_tx_ref = (long)commitment_tx_var.inner;
+       if (commitment_tx_var.is_owned) {
+               commitment_tx_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_counterparty_commitment_meth, commitment_tx_ref);
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)ret);
+       return ret_conv;
+}
+LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs_jcall(const void* this_arg, const LDKHolderCommitmentTransaction * commitment_tx) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKHolderCommitmentTransaction commitment_tx_var = *commitment_tx;
+       commitment_tx_var = HolderCommitmentTransaction_clone(commitment_tx);
+       CHECK((((long)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long commitment_tx_ref = (long)commitment_tx_var.inner;
+       if (commitment_tx_var.is_owned) {
+               commitment_tx_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_holder_commitment_and_htlcs_meth, commitment_tx_ref);
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)ret);
+       return ret_conv;
+}
+LDKCResult_SignatureNoneZ sign_justice_transaction_jcall(const void* this_arg, LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (* per_commitment_key)[32], const LDKHTLCOutputInCommitment * htlc) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKTransaction justice_tx_var = justice_tx;
+       int8_tArray justice_tx_arr = (*env)->NewByteArray(env, justice_tx_var.datalen);
+       (*env)->SetByteArrayRegion(env, justice_tx_arr, 0, justice_tx_var.datalen, justice_tx_var.data);
+       Transaction_free(justice_tx_var);
+       int8_tArray per_commitment_key_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, per_commitment_key_arr, 0, 32, *per_commitment_key);
+       LDKHTLCOutputInCommitment htlc_var = *htlc;
+       htlc_var = HTLCOutputInCommitment_clone(htlc);
+       CHECK((((long)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long htlc_ref = (long)htlc_var.inner;
+       if (htlc_var.is_owned) {
+               htlc_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_justice_transaction_meth, justice_tx_arr, input, amount, per_commitment_key_arr, htlc_ref);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
+       return ret_conv;
+}
+LDKCResult_SignatureNoneZ sign_counterparty_htlc_transaction_jcall(const void* this_arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment * htlc) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKTransaction htlc_tx_var = htlc_tx;
+       int8_tArray htlc_tx_arr = (*env)->NewByteArray(env, htlc_tx_var.datalen);
+       (*env)->SetByteArrayRegion(env, htlc_tx_arr, 0, htlc_tx_var.datalen, htlc_tx_var.data);
+       Transaction_free(htlc_tx_var);
+       int8_tArray per_commitment_point_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, per_commitment_point_arr, 0, 33, per_commitment_point.compressed_form);
+       LDKHTLCOutputInCommitment htlc_var = *htlc;
+       htlc_var = HTLCOutputInCommitment_clone(htlc);
+       CHECK((((long)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long htlc_ref = (long)htlc_var.inner;
+       if (htlc_var.is_owned) {
+               htlc_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_counterparty_htlc_transaction_meth, htlc_tx_arr, input, amount, per_commitment_point_arr, htlc_ref);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
+       return ret_conv;
+}
+LDKCResult_SignatureNoneZ sign_closing_transaction_jcall(const void* this_arg, LDKTransaction closing_tx) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKTransaction closing_tx_var = closing_tx;
+       int8_tArray closing_tx_arr = (*env)->NewByteArray(env, closing_tx_var.datalen);
+       (*env)->SetByteArrayRegion(env, closing_tx_arr, 0, closing_tx_var.datalen, closing_tx_var.data);
+       Transaction_free(closing_tx_var);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_closing_transaction_meth, closing_tx_arr);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
+       return ret_conv;
+}
+LDKCResult_SignatureNoneZ sign_channel_announcement_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement * msg) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKUnsignedChannelAnnouncement msg_var = *msg;
+       msg_var = UnsignedChannelAnnouncement_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)(*env)->CallLongMethod(env, obj, j_calls->sign_channel_announcement_meth, msg_ref);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
+       return ret_conv;
+}
+void ready_channel_jcall(void* this_arg, const LDKChannelTransactionParameters * channel_parameters) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKChannelTransactionParameters channel_parameters_var = *channel_parameters;
+       channel_parameters_var = ChannelTransactionParameters_clone(channel_parameters);
+       CHECK((((long)channel_parameters_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&channel_parameters_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long channel_parameters_ref = (long)channel_parameters_var.inner;
+       if (channel_parameters_var.is_owned) {
+               channel_parameters_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->ready_channel_meth, channel_parameters_ref);
+}
+LDKCVec_u8Z write_jcall(const void* this_arg) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->write_meth);
+       LDKCVec_u8Z ret_ref;
+       ret_ref.datalen = (*env)->GetArrayLength(env, ret);
+       ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, ret, 0, ret_ref.datalen, ret_ref.data);
+       return ret_ref;
+}
+static void* LDKSign_JCalls_clone(const void* this_arg) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKSign LDKSign_init (JNIEnv *env, jclass clz, jobject o, int64_t pubkeys) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKSign_JCalls *calls = MALLOC(sizeof(LDKSign_JCalls), "LDKSign_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->get_per_commitment_point_meth = (*env)->GetMethodID(env, c, "get_per_commitment_point", "(J)[B");
+       CHECK(calls->get_per_commitment_point_meth != NULL);
+       calls->release_commitment_secret_meth = (*env)->GetMethodID(env, c, "release_commitment_secret", "(J)[B");
+       CHECK(calls->release_commitment_secret_meth != NULL);
+       calls->channel_keys_id_meth = (*env)->GetMethodID(env, c, "channel_keys_id", "()[B");
+       CHECK(calls->channel_keys_id_meth != NULL);
+       calls->sign_counterparty_commitment_meth = (*env)->GetMethodID(env, c, "sign_counterparty_commitment", "(J)J");
+       CHECK(calls->sign_counterparty_commitment_meth != NULL);
+       calls->sign_holder_commitment_and_htlcs_meth = (*env)->GetMethodID(env, c, "sign_holder_commitment_and_htlcs", "(J)J");
+       CHECK(calls->sign_holder_commitment_and_htlcs_meth != NULL);
+       calls->sign_justice_transaction_meth = (*env)->GetMethodID(env, c, "sign_justice_transaction", "([BJJ[BJ)J");
+       CHECK(calls->sign_justice_transaction_meth != NULL);
+       calls->sign_counterparty_htlc_transaction_meth = (*env)->GetMethodID(env, c, "sign_counterparty_htlc_transaction", "([BJJ[BJ)J");
+       CHECK(calls->sign_counterparty_htlc_transaction_meth != NULL);
+       calls->sign_closing_transaction_meth = (*env)->GetMethodID(env, c, "sign_closing_transaction", "([B)J");
+       CHECK(calls->sign_closing_transaction_meth != NULL);
+       calls->sign_channel_announcement_meth = (*env)->GetMethodID(env, c, "sign_channel_announcement", "(J)J");
+       CHECK(calls->sign_channel_announcement_meth != NULL);
+       calls->ready_channel_meth = (*env)->GetMethodID(env, c, "ready_channel", "(J)V");
+       CHECK(calls->ready_channel_meth != NULL);
+       calls->write_meth = (*env)->GetMethodID(env, c, "write", "()[B");
+       CHECK(calls->write_meth != NULL);
+
+       LDKChannelPublicKeys pubkeys_conv;
+       pubkeys_conv.inner = (void*)(pubkeys & (~1));
+       pubkeys_conv.is_owned = (pubkeys & 1) || (pubkeys == 0);
+       pubkeys_conv = ChannelPublicKeys_clone(&pubkeys_conv);
+
+       LDKSign ret = {
+               .this_arg = (void*) calls,
+               .get_per_commitment_point = get_per_commitment_point_jcall,
+               .release_commitment_secret = release_commitment_secret_jcall,
+               .channel_keys_id = channel_keys_id_jcall,
+               .sign_counterparty_commitment = sign_counterparty_commitment_jcall,
+               .sign_holder_commitment_and_htlcs = sign_holder_commitment_and_htlcs_jcall,
+               .sign_justice_transaction = sign_justice_transaction_jcall,
+               .sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_jcall,
+               .sign_closing_transaction = sign_closing_transaction_jcall,
+               .sign_channel_announcement = sign_channel_announcement_jcall,
+               .ready_channel = ready_channel_jcall,
+               .clone = LDKSign_JCalls_clone,
+               .write = write_jcall,
+               .free = LDKSign_JCalls_free,
+               .pubkeys = pubkeys_conv,
+               .set_pubkeys = NULL,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSign_1new(JNIEnv *env, jclass clz, jobject o, int64_t pubkeys) {
+       LDKSign *res_ptr = MALLOC(sizeof(LDKSign), "LDKSign");
+       *res_ptr = LDKSign_init(env, clz, o, pubkeys);
+       return (long)res_ptr;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Sign_1get_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_arg, int64_t idx) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, (this_arg_conv->get_per_commitment_point)(this_arg_conv->this_arg, idx).compressed_form);
+       return ret_arr;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Sign_1release_1commitment_1secret(JNIEnv *env, jclass clz, int64_t this_arg, int64_t idx) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, (this_arg_conv->release_commitment_secret)(this_arg_conv->this_arg, idx).data);
+       return ret_arr;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Sign_1channel_1keys_1id(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, (this_arg_conv->channel_keys_id)(this_arg_conv->this_arg).data);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1counterparty_1commitment(JNIEnv *env, jclass clz, int64_t this_arg, int64_t commitment_tx) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKCommitmentTransaction commitment_tx_conv;
+       commitment_tx_conv.inner = (void*)(commitment_tx & (~1));
+       commitment_tx_conv.is_owned = false;
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ), "LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ");
+       *ret_conv = (this_arg_conv->sign_counterparty_commitment)(this_arg_conv->this_arg, &commitment_tx_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1holder_1commitment_1and_1htlcs(JNIEnv *env, jclass clz, int64_t this_arg, int64_t commitment_tx) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKHolderCommitmentTransaction commitment_tx_conv;
+       commitment_tx_conv.inner = (void*)(commitment_tx & (~1));
+       commitment_tx_conv.is_owned = false;
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ), "LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ");
+       *ret_conv = (this_arg_conv->sign_holder_commitment_and_htlcs)(this_arg_conv->this_arg, &commitment_tx_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1justice_1transaction(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray justice_tx, int64_t input, int64_t amount, int8_tArray per_commitment_key, int64_t htlc) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKTransaction justice_tx_ref;
+       justice_tx_ref.datalen = (*env)->GetArrayLength(env, justice_tx);
+       justice_tx_ref.data = MALLOC(justice_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, justice_tx, 0, justice_tx_ref.datalen, justice_tx_ref.data);
+       justice_tx_ref.data_is_owned = true;
+       unsigned char per_commitment_key_arr[32];
+       CHECK((*env)->GetArrayLength(env, per_commitment_key) == 32);
+       (*env)->GetByteArrayRegion(env, per_commitment_key, 0, 32, per_commitment_key_arr);
+       unsigned char (*per_commitment_key_ref)[32] = &per_commitment_key_arr;
+       LDKHTLCOutputInCommitment htlc_conv;
+       htlc_conv.inner = (void*)(htlc & (~1));
+       htlc_conv.is_owned = false;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_justice_transaction)(this_arg_conv->this_arg, justice_tx_ref, input, amount, per_commitment_key_ref, &htlc_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1counterparty_1htlc_1transaction(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray htlc_tx, int64_t input, int64_t amount, int8_tArray per_commitment_point, int64_t htlc) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKTransaction htlc_tx_ref;
+       htlc_tx_ref.datalen = (*env)->GetArrayLength(env, htlc_tx);
+       htlc_tx_ref.data = MALLOC(htlc_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, htlc_tx, 0, htlc_tx_ref.datalen, htlc_tx_ref.data);
+       htlc_tx_ref.data_is_owned = true;
+       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);
+       LDKHTLCOutputInCommitment htlc_conv;
+       htlc_conv.inner = (void*)(htlc & (~1));
+       htlc_conv.is_owned = false;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_counterparty_htlc_transaction)(this_arg_conv->this_arg, htlc_tx_ref, input, amount, per_commitment_point_ref, &htlc_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1closing_1transaction(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray closing_tx) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKTransaction closing_tx_ref;
+       closing_tx_ref.datalen = (*env)->GetArrayLength(env, closing_tx);
+       closing_tx_ref.data = MALLOC(closing_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, closing_tx, 0, closing_tx_ref.datalen, closing_tx_ref.data);
+       closing_tx_ref.data_is_owned = true;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_closing_transaction)(this_arg_conv->this_arg, closing_tx_ref);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1channel_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKUnsignedChannelAnnouncement msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Sign_1ready_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_parameters) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKChannelTransactionParameters channel_parameters_conv;
+       channel_parameters_conv.inner = (void*)(channel_parameters & (~1));
+       channel_parameters_conv.is_owned = false;
+       (this_arg_conv->ready_channel)(this_arg_conv->this_arg, &channel_parameters_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Sign_1write(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKCVec_u8Z ret_var = (this_arg_conv->write)(this_arg_conv->this_arg);
+       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;
+}
+
+LDKChannelPublicKeys LDKSign_set_get_pubkeys(LDKSign* this_arg) {
+       if (this_arg->set_pubkeys != NULL)
+               this_arg->set_pubkeys(this_arg);
+       return this_arg->pubkeys;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sign_1get_1pubkeys(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKChannelPublicKeys ret_var = LDKSign_set_get_pubkeys(this_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       LDKThirtyTwoBytes a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 32);
+       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+       ret->a = a_ref;
+       LDKChannelMonitor b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelMonitor_clone(&b_conv);
+       ret->b = b_conv;
+       return (long)ret;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
+       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
+       return a_arr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
+       LDKChannelMonitor b_var = tuple->b;
+       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long b_ref = (long)b_var.inner & ~1;
+       return b_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = (long)(&(*val->contents.result)) | 1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_TxOutAccessErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TxOutAccessErrorZ *val = (LDKCResult_TxOutAccessErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = ((long)&(*val->contents.result)) | 1;
+       return (long)res_ref;
+}
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TxOutAccessErrorZ *val = (LDKCResult_TxOutAccessErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       jclass err_conv = LDKAccessError_to_java(env, (*val->contents.err));
+       return err_conv;
+}
+static jclass LDKAPIError_APIMisuseError_class = NULL;
+static jmethodID LDKAPIError_APIMisuseError_meth = NULL;
+static jclass LDKAPIError_FeeRateTooHigh_class = NULL;
+static jmethodID LDKAPIError_FeeRateTooHigh_meth = NULL;
+static jclass LDKAPIError_RouteError_class = NULL;
+static jmethodID LDKAPIError_RouteError_meth = NULL;
+static jclass LDKAPIError_ChannelUnavailable_class = NULL;
+static jmethodID LDKAPIError_ChannelUnavailable_meth = NULL;
+static jclass LDKAPIError_MonitorUpdateFailed_class = NULL;
+static jmethodID LDKAPIError_MonitorUpdateFailed_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAPIError_init (JNIEnv *env, jclass clz) {
+       LDKAPIError_APIMisuseError_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAPIError$APIMisuseError;"));
+       CHECK(LDKAPIError_APIMisuseError_class != NULL);
+       LDKAPIError_APIMisuseError_meth = (*env)->GetMethodID(env, LDKAPIError_APIMisuseError_class, "<init>", "([B)V");
+       CHECK(LDKAPIError_APIMisuseError_meth != NULL);
+       LDKAPIError_FeeRateTooHigh_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAPIError$FeeRateTooHigh;"));
+       CHECK(LDKAPIError_FeeRateTooHigh_class != NULL);
+       LDKAPIError_FeeRateTooHigh_meth = (*env)->GetMethodID(env, LDKAPIError_FeeRateTooHigh_class, "<init>", "([BI)V");
+       CHECK(LDKAPIError_FeeRateTooHigh_meth != NULL);
+       LDKAPIError_RouteError_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAPIError$RouteError;"));
+       CHECK(LDKAPIError_RouteError_class != NULL);
+       LDKAPIError_RouteError_meth = (*env)->GetMethodID(env, LDKAPIError_RouteError_class, "<init>", "(Ljava/lang/String;)V");
+       CHECK(LDKAPIError_RouteError_meth != NULL);
+       LDKAPIError_ChannelUnavailable_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAPIError$ChannelUnavailable;"));
+       CHECK(LDKAPIError_ChannelUnavailable_class != NULL);
+       LDKAPIError_ChannelUnavailable_meth = (*env)->GetMethodID(env, LDKAPIError_ChannelUnavailable_class, "<init>", "([B)V");
+       CHECK(LDKAPIError_ChannelUnavailable_meth != NULL);
+       LDKAPIError_MonitorUpdateFailed_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAPIError$MonitorUpdateFailed;"));
+       CHECK(LDKAPIError_MonitorUpdateFailed_class != NULL);
+       LDKAPIError_MonitorUpdateFailed_meth = (*env)->GetMethodID(env, LDKAPIError_MonitorUpdateFailed_class, "<init>", "()V");
+       CHECK(LDKAPIError_MonitorUpdateFailed_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKAPIError *obj = (LDKAPIError*)ptr;
+       switch(obj->tag) {
+               case LDKAPIError_APIMisuseError: {
+                       LDKCVec_u8Z err_var = obj->api_misuse_error.err;
+                       int8_tArray err_arr = (*env)->NewByteArray(env, err_var.datalen);
+                       (*env)->SetByteArrayRegion(env, err_arr, 0, err_var.datalen, err_var.data);
+                       return (*env)->NewObject(env, LDKAPIError_APIMisuseError_class, LDKAPIError_APIMisuseError_meth, err_arr);
+               }
+               case LDKAPIError_FeeRateTooHigh: {
+                       LDKCVec_u8Z err_var = obj->fee_rate_too_high.err;
+                       int8_tArray err_arr = (*env)->NewByteArray(env, err_var.datalen);
+                       (*env)->SetByteArrayRegion(env, err_arr, 0, err_var.datalen, err_var.data);
+                       return (*env)->NewObject(env, LDKAPIError_FeeRateTooHigh_class, LDKAPIError_FeeRateTooHigh_meth, err_arr, obj->fee_rate_too_high.feerate);
+               }
+               case LDKAPIError_RouteError: {
+                       LDKStr err_str = obj->route_error.err;
+                       jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
+                       return (*env)->NewObject(env, LDKAPIError_RouteError_class, LDKAPIError_RouteError_meth, err_conv);
+               }
+               case LDKAPIError_ChannelUnavailable: {
+                       LDKCVec_u8Z err_var = obj->channel_unavailable.err;
+                       int8_tArray err_arr = (*env)->NewByteArray(env, err_var.datalen);
+                       (*env)->SetByteArrayRegion(env, err_arr, 0, err_var.datalen, err_var.data);
+                       return (*env)->NewObject(env, LDKAPIError_ChannelUnavailable_class, LDKAPIError_ChannelUnavailable_meth, err_arr);
+               }
+               case LDKAPIError_MonitorUpdateFailed: {
+                       return (*env)->NewObject(env, LDKAPIError_MonitorUpdateFailed_class, LDKAPIError_MonitorUpdateFailed_meth);
+               }
+               default: abort();
+       }
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NoneAPIErrorZ*)arg)->result_ok;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneAPIErrorZ *val = (LDKCResult_NoneAPIErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NoneAPIErrorZ *val = (LDKCResult_NoneAPIErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       long err_ref = ((long)&(*val->contents.err)) | 1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1CResult_1NoneAPIErrorZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_CResult_NoneAPIErrorZZ *ret = MALLOC(sizeof(LDKCVec_CResult_NoneAPIErrorZZ), "LDKCVec_CResult_NoneAPIErrorZZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ) * ret->datalen, "LDKCVec_CResult_NoneAPIErrorZZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKCResult_NoneAPIErrorZ arr_elem_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_CResult_NoneAPIErrorZZ CVec_CResult_NoneAPIErrorZZ_clone(const LDKCVec_CResult_NoneAPIErrorZZ *orig) {
+       LDKCVec_CResult_NoneAPIErrorZZ ret = { .data = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ) * orig->datalen, "LDKCVec_CResult_NoneAPIErrorZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = CResult_NoneAPIErrorZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1APIErrorZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_APIErrorZ *ret = MALLOC(sizeof(LDKCVec_APIErrorZ), "LDKCVec_APIErrorZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKAPIError) * ret->datalen, "LDKCVec_APIErrorZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKAPIError arr_elem_conv = *(LDKAPIError*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_APIErrorZ CVec_APIErrorZ_clone(const LDKCVec_APIErrorZ *orig) {
+       LDKCVec_APIErrorZ ret = { .data = MALLOC(sizeof(LDKAPIError) * orig->datalen, "LDKCVec_APIErrorZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = APIError_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelDetailsZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_ChannelDetailsZ *ret = MALLOC(sizeof(LDKCVec_ChannelDetailsZ), "LDKCVec_ChannelDetailsZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKChannelDetails) * ret->datalen, "LDKCVec_ChannelDetailsZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKChannelDetails arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = ChannelDetails_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+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++) {
+               ret.data[i] = ChannelDetails_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static jclass LDKPaymentSendFailure_ParameterError_class = NULL;
+static jmethodID LDKPaymentSendFailure_ParameterError_meth = NULL;
+static jclass LDKPaymentSendFailure_PathParameterError_class = NULL;
+static jmethodID LDKPaymentSendFailure_PathParameterError_meth = NULL;
+static jclass LDKPaymentSendFailure_AllFailedRetrySafe_class = NULL;
+static jmethodID LDKPaymentSendFailure_AllFailedRetrySafe_meth = NULL;
+static jclass LDKPaymentSendFailure_PartialFailure_class = NULL;
+static jmethodID LDKPaymentSendFailure_PartialFailure_meth = NULL;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentSendFailure_init (JNIEnv *env, jclass clz) {
+       LDKPaymentSendFailure_ParameterError_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$ParameterError;"));
+       CHECK(LDKPaymentSendFailure_ParameterError_class != NULL);
+       LDKPaymentSendFailure_ParameterError_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_ParameterError_class, "<init>", "()V");
+       CHECK(LDKPaymentSendFailure_ParameterError_meth != NULL);
+       LDKPaymentSendFailure_PathParameterError_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$PathParameterError;"));
+       CHECK(LDKPaymentSendFailure_PathParameterError_class != NULL);
+       LDKPaymentSendFailure_PathParameterError_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_PathParameterError_class, "<init>", "()V");
+       CHECK(LDKPaymentSendFailure_PathParameterError_meth != NULL);
+       LDKPaymentSendFailure_AllFailedRetrySafe_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$AllFailedRetrySafe;"));
+       CHECK(LDKPaymentSendFailure_AllFailedRetrySafe_class != NULL);
+       LDKPaymentSendFailure_AllFailedRetrySafe_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_AllFailedRetrySafe_class, "<init>", "()V");
+       CHECK(LDKPaymentSendFailure_AllFailedRetrySafe_meth != NULL);
+       LDKPaymentSendFailure_PartialFailure_class =
+               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKPaymentSendFailure$PartialFailure;"));
+       CHECK(LDKPaymentSendFailure_PartialFailure_class != NULL);
+       LDKPaymentSendFailure_PartialFailure_meth = (*env)->GetMethodID(env, LDKPaymentSendFailure_PartialFailure_class, "<init>", "()V");
+       CHECK(LDKPaymentSendFailure_PartialFailure_meth != NULL);
+}
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentSendFailure_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)ptr;
+       switch(obj->tag) {
+               case LDKPaymentSendFailure_ParameterError: {
+                       return (*env)->NewObject(env, LDKPaymentSendFailure_ParameterError_class, LDKPaymentSendFailure_ParameterError_meth);
+               }
+               case LDKPaymentSendFailure_PathParameterError: {
+                       return (*env)->NewObject(env, LDKPaymentSendFailure_PathParameterError_class, LDKPaymentSendFailure_PathParameterError_meth);
+               }
+               case LDKPaymentSendFailure_AllFailedRetrySafe: {
+                       return (*env)->NewObject(env, LDKPaymentSendFailure_AllFailedRetrySafe_class, LDKPaymentSendFailure_AllFailedRetrySafe_meth);
+               }
+               case LDKPaymentSendFailure_PartialFailure: {
+                       return (*env)->NewObject(env, LDKPaymentSendFailure_PartialFailure_class, LDKPaymentSendFailure_PartialFailure_meth);
+               }
+               default: abort();
+       }
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NonePaymentSendFailureZ*)arg)->result_ok;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NonePaymentSendFailureZ *val = (LDKCResult_NonePaymentSendFailureZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NonePaymentSendFailureZ *val = (LDKCResult_NonePaymentSendFailureZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       long err_ref = ((long)&(*val->contents.err)) | 1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelMonitorZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_ChannelMonitorZ *ret = MALLOC(sizeof(LDKCVec_ChannelMonitorZ), "LDKCVec_ChannelMonitorZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKChannelMonitor) * ret->datalen, "LDKCVec_ChannelMonitorZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKChannelMonitor arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = ChannelMonitor_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_ChannelMonitorZ CVec_ChannelMonitorZ_clone(const LDKCVec_ChannelMonitorZ *orig) {
+       LDKCVec_ChannelMonitorZ ret = { .data = MALLOC(sizeof(LDKChannelMonitor) * orig->datalen, "LDKCVec_ChannelMonitorZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = ChannelMonitor_clone(&orig->data[i]);
+       }
+       return ret;
+}
+typedef struct LDKWatch_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID watch_channel_meth;
+       jmethodID update_channel_meth;
+       jmethodID release_pending_monitor_events_meth;
+} LDKWatch_JCalls;
+static void LDKWatch_JCalls_free(void* this_arg) {
+       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
+}
+LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
+       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKOutPoint funding_txo_var = funding_txo;
+       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long funding_txo_ref = (long)funding_txo_var.inner;
+       if (funding_txo_var.is_owned) {
+               funding_txo_ref |= 1;
+       }
+       LDKChannelMonitor monitor_var = monitor;
+       CHECK((((long)monitor_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&monitor_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long monitor_ref = (long)monitor_var.inner;
+       if (monitor_var.is_owned) {
+               monitor_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->watch_channel_meth, funding_txo_ref, monitor_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
+}
+LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
+       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKOutPoint funding_txo_var = funding_txo;
+       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long funding_txo_ref = (long)funding_txo_var.inner;
+       if (funding_txo_var.is_owned) {
+               funding_txo_ref |= 1;
+       }
+       LDKChannelMonitorUpdate update_var = update;
+       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long update_ref = (long)update_var.inner;
+       if (update_var.is_owned) {
+               update_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->update_channel_meth, funding_txo_ref, update_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
+}
+LDKCVec_MonitorEventZ release_pending_monitor_events_jcall(const void* this_arg) {
+       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int64_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->release_pending_monitor_events_meth);
+       LDKCVec_MonitorEventZ ret_constr;
+       ret_constr.datalen = (*env)->GetArrayLength(env, ret);
+       if (ret_constr.datalen > 0)
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+       else
+               ret_constr.data = NULL;
+       int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
+       for (size_t o = 0; o < ret_constr.datalen; o++) {
+               int64_t ret_conv_14 = ret_vals[o];
+               LDKMonitorEvent ret_conv_14_conv = *(LDKMonitorEvent*)(((uint64_t)ret_conv_14) & ~1);
+               ret_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)ret_conv_14);
+               ret_constr.data[o] = ret_conv_14_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
+       return ret_constr;
+}
+static void* LDKWatch_JCalls_clone(const void* this_arg) {
+       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKWatch LDKWatch_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKWatch_JCalls *calls = MALLOC(sizeof(LDKWatch_JCalls), "LDKWatch_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->watch_channel_meth = (*env)->GetMethodID(env, c, "watch_channel", "(JJ)J");
+       CHECK(calls->watch_channel_meth != NULL);
+       calls->update_channel_meth = (*env)->GetMethodID(env, c, "update_channel", "(JJ)J");
+       CHECK(calls->update_channel_meth != NULL);
+       calls->release_pending_monitor_events_meth = (*env)->GetMethodID(env, c, "release_pending_monitor_events", "()[J");
+       CHECK(calls->release_pending_monitor_events_meth != NULL);
+
+       LDKWatch ret = {
+               .this_arg = (void*) calls,
+               .watch_channel = watch_channel_jcall,
+               .update_channel = update_channel_jcall,
+               .release_pending_monitor_events = release_pending_monitor_events_jcall,
+               .free = LDKWatch_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKWatch *res_ptr = MALLOC(sizeof(LDKWatch), "LDKWatch");
+       *res_ptr = LDKWatch_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t funding_txo, int64_t monitor) {
+       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
+       LDKOutPoint funding_txo_conv;
+       funding_txo_conv.inner = (void*)(funding_txo & (~1));
+       funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
+       funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+       LDKChannelMonitor monitor_conv;
+       monitor_conv.inner = (void*)(monitor & (~1));
+       monitor_conv.is_owned = (monitor & 1) || (monitor == 0);
+       monitor_conv = ChannelMonitor_clone(&monitor_conv);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t funding_txo, int64_t update) {
+       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
+       LDKOutPoint funding_txo_conv;
+       funding_txo_conv.inner = (void*)(funding_txo & (~1));
+       funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
+       funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+       LDKChannelMonitorUpdate update_conv;
+       update_conv.inner = (void*)(update & (~1));
+       update_conv.is_owned = (update & 1) || (update == 0);
+       update_conv = ChannelMonitorUpdate_clone(&update_conv);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pending_1monitor_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
+       LDKCVec_MonitorEventZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t o = 0; o < ret_var.datalen; o++) {
+               LDKMonitorEvent *ret_conv_14_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
+               *ret_conv_14_copy = MonitorEvent_clone(&ret_var.data[o]);
+               long ret_conv_14_ref = (long)ret_conv_14_copy;
+               ret_arr_ptr[o] = ret_conv_14_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+typedef struct LDKBroadcasterInterface_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID broadcast_transaction_meth;
+} LDKBroadcasterInterface_JCalls;
+static void LDKBroadcasterInterface_JCalls_free(void* this_arg) {
+       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
+}
+void broadcast_transaction_jcall(const void* this_arg, LDKTransaction tx) {
+       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKTransaction tx_var = tx;
+       int8_tArray tx_arr = (*env)->NewByteArray(env, tx_var.datalen);
+       (*env)->SetByteArrayRegion(env, tx_arr, 0, tx_var.datalen, tx_var.data);
+       Transaction_free(tx_var);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->broadcast_transaction_meth, tx_arr);
+}
+static void* LDKBroadcasterInterface_JCalls_clone(const void* this_arg) {
+       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKBroadcasterInterface LDKBroadcasterInterface_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKBroadcasterInterface_JCalls *calls = MALLOC(sizeof(LDKBroadcasterInterface_JCalls), "LDKBroadcasterInterface_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->broadcast_transaction_meth = (*env)->GetMethodID(env, c, "broadcast_transaction", "([B)V");
+       CHECK(calls->broadcast_transaction_meth != NULL);
+
+       LDKBroadcasterInterface ret = {
+               .this_arg = (void*) calls,
+               .broadcast_transaction = broadcast_transaction_jcall,
+               .free = LDKBroadcasterInterface_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKBroadcasterInterface *res_ptr = MALLOC(sizeof(LDKBroadcasterInterface), "LDKBroadcasterInterface");
+       *res_ptr = LDKBroadcasterInterface_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1broadcast_1transaction(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx) {
+       LDKBroadcasterInterface* this_arg_conv = (LDKBroadcasterInterface*)this_arg;
+       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;
+       (this_arg_conv->broadcast_transaction)(this_arg_conv->this_arg, tx_ref);
+}
+
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_SignDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SignDecodeErrorZ *val = (LDKCResult_SignDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKSign* ret = MALLOC(sizeof(LDKSign), "LDKSign");
+       *ret = Sign_clone(&(*val->contents.result));
+       return (long)ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SignDecodeErrorZ *val = (LDKCResult_SignDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+typedef struct LDKKeysInterface_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID get_node_secret_meth;
+       jmethodID get_destination_script_meth;
+       jmethodID get_shutdown_pubkey_meth;
+       jmethodID get_channel_signer_meth;
+       jmethodID get_secure_random_bytes_meth;
+       jmethodID read_chan_signer_meth;
+} LDKKeysInterface_JCalls;
+static void LDKKeysInterface_JCalls_free(void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
+}
+LDKSecretKey get_node_secret_jcall(const void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->get_node_secret_meth);
+       LDKSecretKey ret_ref;
+       CHECK((*env)->GetArrayLength(env, ret) == 32);
+       (*env)->GetByteArrayRegion(env, ret, 0, 32, ret_ref.bytes);
+       return ret_ref;
+}
+LDKCVec_u8Z get_destination_script_jcall(const void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->get_destination_script_meth);
+       LDKCVec_u8Z ret_ref;
+       ret_ref.datalen = (*env)->GetArrayLength(env, ret);
+       ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, ret, 0, ret_ref.datalen, ret_ref.data);
+       return ret_ref;
+}
+LDKPublicKey get_shutdown_pubkey_jcall(const void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->get_shutdown_pubkey_meth);
+       LDKPublicKey ret_ref;
+       CHECK((*env)->GetArrayLength(env, ret) == 33);
+       (*env)->GetByteArrayRegion(env, ret, 0, 33, ret_ref.compressed_form);
+       return ret_ref;
+}
+LDKSign get_channel_signer_jcall(const void* this_arg, bool inbound, uint64_t channel_value_satoshis) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKSign* ret = (LDKSign*)(*env)->CallLongMethod(env, obj, j_calls->get_channel_signer_meth, inbound, channel_value_satoshis);
+       LDKSign ret_conv = *(LDKSign*)(((uint64_t)ret) & ~1);
+       ret_conv = Sign_clone(ret);
+       return ret_conv;
+}
+LDKThirtyTwoBytes get_secure_random_bytes_jcall(const void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int8_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->get_secure_random_bytes_meth);
+       LDKThirtyTwoBytes ret_ref;
+       CHECK((*env)->GetArrayLength(env, ret) == 32);
+       (*env)->GetByteArrayRegion(env, ret, 0, 32, ret_ref.data);
+       return ret_ref;
+}
+LDKCResult_SignDecodeErrorZ read_chan_signer_jcall(const void* this_arg, LDKu8slice reader) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKu8slice reader_var = reader;
+       int8_tArray reader_arr = (*env)->NewByteArray(env, reader_var.datalen);
+       (*env)->SetByteArrayRegion(env, reader_arr, 0, reader_var.datalen, reader_var.data);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_SignDecodeErrorZ* ret = (LDKCResult_SignDecodeErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->read_chan_signer_meth, reader_arr);
+       LDKCResult_SignDecodeErrorZ ret_conv = *(LDKCResult_SignDecodeErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_SignDecodeErrorZ_clone((LDKCResult_SignDecodeErrorZ*)ret);
+       return ret_conv;
+}
+static void* LDKKeysInterface_JCalls_clone(const void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKKeysInterface LDKKeysInterface_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKKeysInterface_JCalls *calls = MALLOC(sizeof(LDKKeysInterface_JCalls), "LDKKeysInterface_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->get_node_secret_meth = (*env)->GetMethodID(env, c, "get_node_secret", "()[B");
+       CHECK(calls->get_node_secret_meth != NULL);
+       calls->get_destination_script_meth = (*env)->GetMethodID(env, c, "get_destination_script", "()[B");
+       CHECK(calls->get_destination_script_meth != NULL);
+       calls->get_shutdown_pubkey_meth = (*env)->GetMethodID(env, c, "get_shutdown_pubkey", "()[B");
+       CHECK(calls->get_shutdown_pubkey_meth != NULL);
+       calls->get_channel_signer_meth = (*env)->GetMethodID(env, c, "get_channel_signer", "(ZJ)J");
+       CHECK(calls->get_channel_signer_meth != NULL);
+       calls->get_secure_random_bytes_meth = (*env)->GetMethodID(env, c, "get_secure_random_bytes", "()[B");
+       CHECK(calls->get_secure_random_bytes_meth != NULL);
+       calls->read_chan_signer_meth = (*env)->GetMethodID(env, c, "read_chan_signer", "([B)J");
+       CHECK(calls->read_chan_signer_meth != NULL);
+
+       LDKKeysInterface ret = {
+               .this_arg = (void*) calls,
+               .get_node_secret = get_node_secret_jcall,
+               .get_destination_script = get_destination_script_jcall,
+               .get_shutdown_pubkey = get_shutdown_pubkey_jcall,
+               .get_channel_signer = get_channel_signer_jcall,
+               .get_secure_random_bytes = get_secure_random_bytes_jcall,
+               .read_chan_signer = read_chan_signer_jcall,
+               .free = LDKKeysInterface_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKKeysInterface *res_ptr = MALLOC(sizeof(LDKKeysInterface), "LDKKeysInterface");
+       *res_ptr = LDKKeysInterface_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1secret(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, (this_arg_conv->get_node_secret)(this_arg_conv->this_arg).bytes);
+       return ret_arr;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1destination_1script(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       LDKCVec_u8Z ret_var = (this_arg_conv->get_destination_script)(this_arg_conv->this_arg);
+       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_KeysInterface_1get_1shutdown_1pubkey(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, (this_arg_conv->get_shutdown_pubkey)(this_arg_conv->this_arg).compressed_form);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1channel_1signer(JNIEnv *env, jclass clz, int64_t this_arg, jboolean inbound, int64_t channel_value_satoshis) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       LDKSign* ret = MALLOC(sizeof(LDKSign), "LDKSign");
+       *ret = (this_arg_conv->get_channel_signer)(this_arg_conv->this_arg, inbound, channel_value_satoshis);
+       return (long)ret;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1secure_1random_1bytes(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, (this_arg_conv->get_secure_random_bytes)(this_arg_conv->this_arg).data);
+       return ret_arr;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1read_1chan_1signer(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray reader) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       LDKu8slice reader_ref;
+       reader_ref.datalen = (*env)->GetArrayLength(env, reader);
+       reader_ref.data = (*env)->GetByteArrayElements (env, reader, NULL);
+       LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
+       *ret_conv = (this_arg_conv->read_chan_signer)(this_arg_conv->this_arg, reader_ref);
+       (*env)->ReleaseByteArrayElements(env, reader, (int8_t*)reader_ref.data, 0);
+       return (long)ret_conv;
+}
+
+typedef struct LDKFeeEstimator_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID get_est_sat_per_1000_weight_meth;
+} LDKFeeEstimator_JCalls;
+static void LDKFeeEstimator_JCalls_free(void* this_arg) {
+       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
+}
+uint32_t get_est_sat_per_1000_weight_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
+       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jclass confirmation_target_conv = LDKConfirmationTarget_to_java(env, confirmation_target);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallIntMethod(env, obj, j_calls->get_est_sat_per_1000_weight_meth, confirmation_target_conv);
+}
+static void* LDKFeeEstimator_JCalls_clone(const void* this_arg) {
+       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKFeeEstimator LDKFeeEstimator_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKFeeEstimator_JCalls *calls = MALLOC(sizeof(LDKFeeEstimator_JCalls), "LDKFeeEstimator_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->get_est_sat_per_1000_weight_meth = (*env)->GetMethodID(env, c, "get_est_sat_per_1000_weight", "(Lorg/ldk/enums/LDKConfirmationTarget;)I");
+       CHECK(calls->get_est_sat_per_1000_weight_meth != NULL);
+
+       LDKFeeEstimator ret = {
+               .this_arg = (void*) calls,
+               .get_est_sat_per_1000_weight = get_est_sat_per_1000_weight_jcall,
+               .free = LDKFeeEstimator_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKFeeEstimator *res_ptr = MALLOC(sizeof(LDKFeeEstimator), "LDKFeeEstimator");
+       *res_ptr = LDKFeeEstimator_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1get_1est_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_arg, jclass confirmation_target) {
+       LDKFeeEstimator* this_arg_conv = (LDKFeeEstimator*)this_arg;
+       LDKConfirmationTarget confirmation_target_conv = LDKConfirmationTarget_from_java(env, confirmation_target);
+       int32_t ret_val = (this_arg_conv->get_est_sat_per_1000_weight)(this_arg_conv->this_arg, confirmation_target_conv);
+       return ret_val;
+}
+
+typedef struct LDKLogger_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID log_meth;
+} LDKLogger_JCalls;
+static void LDKLogger_JCalls_free(void* this_arg) {
+       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
+}
+void log_jcall(const void* this_arg, const char* record) {
+       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       const char* record_str = record;
+       jstring record_conv = str_ref_to_java(env, record_str, strlen(record_str));
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->log_meth, record_conv);
+}
+static void* LDKLogger_JCalls_clone(const void* this_arg) {
+       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKLogger LDKLogger_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKLogger_JCalls *calls = MALLOC(sizeof(LDKLogger_JCalls), "LDKLogger_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->log_meth = (*env)->GetMethodID(env, c, "log", "(Ljava/lang/String;)V");
+       CHECK(calls->log_meth != NULL);
+
+       LDKLogger ret = {
+               .this_arg = (void*) calls,
+               .log = log_jcall,
+               .free = LDKLogger_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKLogger *res_ptr = MALLOC(sizeof(LDKLogger), "LDKLogger");
+       *res_ptr = LDKLogger_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
+       LDKC2Tuple_BlockHashChannelManagerZ* ret = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       LDKThirtyTwoBytes a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 32);
+       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+       ret->a = a_ref;
+       LDKChannelManager b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       // Warning: we need a move here but no clone is available for LDKChannelManager
+       ret->b = b_conv;
+       return (long)ret;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
+       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
+       return a_arr;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
+       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
+       LDKChannelManager b_var = tuple->b;
+       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long b_ref = (long)b_var.inner & ~1;
+       return b_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = (long)(&(*val->contents.result)) | 1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = ((long)&(*val->contents.result)) | 1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+static inline LDKCVec_CVec_u8ZZ CVec_CVec_u8ZZ_clone(const LDKCVec_CVec_u8ZZ *orig) {
+       LDKCVec_CVec_u8ZZ ret = { .data = MALLOC(sizeof(LDKCVec_u8Z) * orig->datalen, "LDKCVec_CVec_u8ZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = CVec_u8Z_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1CVec_1u8ZZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CVec_CVec_u8ZZNoneZ*)arg)->result_ok;
+}
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1CVec_1u8ZZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CVec_CVec_u8ZZNoneZ *val = (LDKCResult_CVec_CVec_u8ZZNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCVec_CVec_u8ZZ res_var = (*val->contents.result);
+       jobjectArray res_arr = (*env)->NewObjectArray(env, res_var.datalen, arr_of_B_clz, NULL);
+       ;
+       for (size_t i = 0; i < res_var.datalen; i++) {
+               LDKCVec_u8Z res_conv_8_var = res_var.data[i];
+               int8_tArray res_conv_8_arr = (*env)->NewByteArray(env, res_conv_8_var.datalen);
+               (*env)->SetByteArrayRegion(env, res_conv_8_arr, 0, res_conv_8_var.datalen, res_conv_8_var.data);
+               (*env)->SetObjectArrayElement(env, res_arr, i, res_conv_8_arr);
+       }
+       return res_arr;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1CVec_1u8ZZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CVec_CVec_u8ZZNoneZ *val = (LDKCResult_CVec_CVec_u8ZZNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemorySignerDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_InMemorySignerDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemorySignerDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InMemorySignerDecodeErrorZ *val = (LDKCResult_InMemorySignerDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKInMemorySigner res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemorySignerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InMemorySignerDecodeErrorZ *val = (LDKCResult_InMemorySignerDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1TxOutZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_TxOutZ *ret = MALLOC(sizeof(LDKCVec_TxOutZ), "LDKCVec_TxOutZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKTxOut) * ret->datalen, "LDKCVec_TxOutZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKTxOut arr_elem_conv = *(LDKTxOut*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_TxOutZ CVec_TxOutZ_clone(const LDKCVec_TxOutZ *orig) {
+       LDKCVec_TxOutZ ret = { .data = MALLOC(sizeof(LDKTxOut) * orig->datalen, "LDKCVec_TxOutZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = TxOut_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TransactionNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_TransactionNoneZ*)arg)->result_ok;
+}
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TransactionNoneZ *val = (LDKCResult_TransactionNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTransaction res_var = (*val->contents.result);
+       int8_tArray res_arr = (*env)->NewByteArray(env, res_var.datalen);
+       (*env)->SetByteArrayRegion(env, res_arr, 0, res_var.datalen, res_var.data);
+       return res_arr;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_TransactionNoneZ *val = (LDKCResult_TransactionNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHopZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_RouteHopZ *ret = MALLOC(sizeof(LDKCVec_RouteHopZ), "LDKCVec_RouteHopZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKRouteHop) * ret->datalen, "LDKCVec_RouteHopZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKRouteHop arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = RouteHop_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_RouteHopZ CVec_RouteHopZ_clone(const LDKCVec_RouteHopZ *orig) {
+       LDKCVec_RouteHopZ ret = { .data = MALLOC(sizeof(LDKRouteHop) * orig->datalen, "LDKCVec_RouteHopZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = RouteHop_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static inline LDKCVec_CVec_RouteHopZZ CVec_CVec_RouteHopZZ_clone(const LDKCVec_CVec_RouteHopZZ *orig) {
+       LDKCVec_CVec_RouteHopZZ ret = { .data = MALLOC(sizeof(LDKCVec_RouteHopZ) * orig->datalen, "LDKCVec_CVec_RouteHopZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = CVec_RouteHopZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_RouteDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKRoute res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHintZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_RouteHintZ *ret = MALLOC(sizeof(LDKCVec_RouteHintZ), "LDKCVec_RouteHintZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKRouteHint) * ret->datalen, "LDKCVec_RouteHintZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKRouteHint arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = RouteHint_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_RouteHintZ CVec_RouteHintZ_clone(const LDKCVec_RouteHintZ *orig) {
+       LDKCVec_RouteHintZ ret = { .data = MALLOC(sizeof(LDKRouteHint) * orig->datalen, "LDKCVec_RouteHintZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = RouteHint_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_RouteLightningErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKRoute res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKLightningError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NetAddressu8Z*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NetAddressu8Z *val = (LDKCResult_NetAddressu8Z*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = ((long)&(*val->contents.result)) | 1;
+       return res_ref;
+}
+JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NetAddressu8Z *val = (LDKCResult_NetAddressu8Z*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *val = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCResult_NetAddressu8Z* res_conv = MALLOC(sizeof(LDKCResult_NetAddressu8Z), "LDKCResult_NetAddressu8Z");
+       *res_conv = (*val->contents.result);
+       *res_conv = CResult_NetAddressu8Z_clone(res_conv);
+       return (long)res_conv;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *val = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateAddHTLCZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_UpdateAddHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateAddHTLCZ), "LDKCVec_UpdateAddHTLCZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKUpdateAddHTLC) * ret->datalen, "LDKCVec_UpdateAddHTLCZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKUpdateAddHTLC arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = UpdateAddHTLC_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_UpdateAddHTLCZ CVec_UpdateAddHTLCZ_clone(const LDKCVec_UpdateAddHTLCZ *orig) {
+       LDKCVec_UpdateAddHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateAddHTLC) * orig->datalen, "LDKCVec_UpdateAddHTLCZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = UpdateAddHTLC_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFulfillHTLCZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_UpdateFulfillHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFulfillHTLCZ), "LDKCVec_UpdateFulfillHTLCZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKUpdateFulfillHTLC) * ret->datalen, "LDKCVec_UpdateFulfillHTLCZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKUpdateFulfillHTLC arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = UpdateFulfillHTLC_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_UpdateFulfillHTLCZ CVec_UpdateFulfillHTLCZ_clone(const LDKCVec_UpdateFulfillHTLCZ *orig) {
+       LDKCVec_UpdateFulfillHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFulfillHTLC) * orig->datalen, "LDKCVec_UpdateFulfillHTLCZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = UpdateFulfillHTLC_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailHTLCZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_UpdateFailHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFailHTLCZ), "LDKCVec_UpdateFailHTLCZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKUpdateFailHTLC) * ret->datalen, "LDKCVec_UpdateFailHTLCZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKUpdateFailHTLC arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = UpdateFailHTLC_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_UpdateFailHTLCZ CVec_UpdateFailHTLCZ_clone(const LDKCVec_UpdateFailHTLCZ *orig) {
+       LDKCVec_UpdateFailHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFailHTLC) * orig->datalen, "LDKCVec_UpdateFailHTLCZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = UpdateFailHTLC_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailMalformedHTLCZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
+       LDKCVec_UpdateFailMalformedHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFailMalformedHTLCZ), "LDKCVec_UpdateFailMalformedHTLCZ");
+       ret->datalen = (*env)->GetArrayLength(env, elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKUpdateFailMalformedHTLC) * ret->datalen, "LDKCVec_UpdateFailMalformedHTLCZ Data");
+               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       int64_t arr_elem = java_elems[i];
+                       LDKUpdateFailMalformedHTLC arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = UpdateFailMalformedHTLC_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+       }
+       return (long)ret;
+}
+static inline LDKCVec_UpdateFailMalformedHTLCZ CVec_UpdateFailMalformedHTLCZ_clone(const LDKCVec_UpdateFailMalformedHTLCZ *orig) {
+       LDKCVec_UpdateFailMalformedHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFailMalformedHTLC) * orig->datalen, "LDKCVec_UpdateFailMalformedHTLCZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = UpdateFailMalformedHTLC_clone(&orig->data[i]);
+       }
+       return ret;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_AcceptChannelDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_AcceptChannelDecodeErrorZ *val = (LDKCResult_AcceptChannelDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKAcceptChannel res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_AcceptChannelDecodeErrorZ *val = (LDKCResult_AcceptChannelDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_AnnouncementSignaturesDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ *val = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKAnnouncementSignatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ *val = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelReestablishDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelReestablish res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ClosingSignedDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ClosingSignedDecodeErrorZ *val = (LDKCResult_ClosingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKClosingSigned res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ClosingSignedDecodeErrorZ *val = (LDKCResult_ClosingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_CommitmentSignedDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CommitmentSignedDecodeErrorZ *val = (LDKCResult_CommitmentSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCommitmentSigned res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_CommitmentSignedDecodeErrorZ *val = (LDKCResult_CommitmentSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_FundingCreatedDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingCreatedDecodeErrorZ *val = (LDKCResult_FundingCreatedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKFundingCreated res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingCreatedDecodeErrorZ *val = (LDKCResult_FundingCreatedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_FundingSignedDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingSignedDecodeErrorZ *val = (LDKCResult_FundingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKFundingSigned res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingSignedDecodeErrorZ *val = (LDKCResult_FundingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_FundingLockedDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingLockedDecodeErrorZ *val = (LDKCResult_FundingLockedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKFundingLocked res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_FundingLockedDecodeErrorZ *val = (LDKCResult_FundingLockedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_InitDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKInit res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_OpenChannelDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OpenChannelDecodeErrorZ *val = (LDKCResult_OpenChannelDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKOpenChannel res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_OpenChannelDecodeErrorZ *val = (LDKCResult_OpenChannelDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_RevokeAndACKDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RevokeAndACKDecodeErrorZ *val = (LDKCResult_RevokeAndACKDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKRevokeAndACK res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_RevokeAndACKDecodeErrorZ *val = (LDKCResult_RevokeAndACKDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ShutdownDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ShutdownDecodeErrorZ *val = (LDKCResult_ShutdownDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKShutdown res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ShutdownDecodeErrorZ *val = (LDKCResult_ShutdownDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UpdateFailHTLCDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateFailHTLC res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-void ready_channel_jcall(void* this_arg, const LDKChannelTransactionParameters * channel_parameters) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKChannelTransactionParameters channel_parameters_var = *channel_parameters;
-       channel_parameters_var = ChannelTransactionParameters_clone(channel_parameters);
-       CHECK((((long)channel_parameters_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&channel_parameters_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long channel_parameters_ref = (long)channel_parameters_var.inner;
-       if (channel_parameters_var.is_owned) {
-               channel_parameters_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->ready_channel_meth, channel_parameters_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-LDKCVec_u8Z write_jcall(const void* this_arg) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       int8_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->write_meth);
-       LDKCVec_u8Z arg_ref;
-       arg_ref.datalen = (*env)->GetArrayLength(env, arg);
-       arg_ref.data = MALLOC(arg_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, arg, 0, arg_ref.datalen, arg_ref.data);
-       return arg_ref;
-}
-static void* LDKChannelKeys_JCalls_clone(const void* this_arg) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)arg)->result_ok;
 }
-static inline LDKChannelKeys LDKChannelKeys_init (JNIEnv *env, jclass clz, jobject o, int64_t pubkeys) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKChannelKeys_JCalls *calls = MALLOC(sizeof(LDKChannelKeys_JCalls), "LDKChannelKeys_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->get_per_commitment_point_meth = (*env)->GetMethodID(env, c, "get_per_commitment_point", "(J)[B");
-       CHECK(calls->get_per_commitment_point_meth != NULL);
-       calls->release_commitment_secret_meth = (*env)->GetMethodID(env, c, "release_commitment_secret", "(J)[B");
-       CHECK(calls->release_commitment_secret_meth != NULL);
-       calls->key_derivation_params_meth = (*env)->GetMethodID(env, c, "key_derivation_params", "()J");
-       CHECK(calls->key_derivation_params_meth != NULL);
-       calls->sign_counterparty_commitment_meth = (*env)->GetMethodID(env, c, "sign_counterparty_commitment", "(J)J");
-       CHECK(calls->sign_counterparty_commitment_meth != NULL);
-       calls->sign_holder_commitment_and_htlcs_meth = (*env)->GetMethodID(env, c, "sign_holder_commitment_and_htlcs", "(J)J");
-       CHECK(calls->sign_holder_commitment_and_htlcs_meth != NULL);
-       calls->sign_justice_transaction_meth = (*env)->GetMethodID(env, c, "sign_justice_transaction", "([BJJ[BJ)J");
-       CHECK(calls->sign_justice_transaction_meth != NULL);
-       calls->sign_counterparty_htlc_transaction_meth = (*env)->GetMethodID(env, c, "sign_counterparty_htlc_transaction", "([BJJ[BJ)J");
-       CHECK(calls->sign_counterparty_htlc_transaction_meth != NULL);
-       calls->sign_closing_transaction_meth = (*env)->GetMethodID(env, c, "sign_closing_transaction", "([B)J");
-       CHECK(calls->sign_closing_transaction_meth != NULL);
-       calls->sign_channel_announcement_meth = (*env)->GetMethodID(env, c, "sign_channel_announcement", "(J)J");
-       CHECK(calls->sign_channel_announcement_meth != NULL);
-       calls->ready_channel_meth = (*env)->GetMethodID(env, c, "ready_channel", "(J)V");
-       CHECK(calls->ready_channel_meth != NULL);
-       calls->write_meth = (*env)->GetMethodID(env, c, "write", "()[B");
-       CHECK(calls->write_meth != NULL);
-
-       LDKChannelPublicKeys pubkeys_conv;
-       pubkeys_conv.inner = (void*)(pubkeys & (~1));
-       pubkeys_conv.is_owned = (pubkeys & 1) || (pubkeys == 0);
-       pubkeys_conv = ChannelPublicKeys_clone(&pubkeys_conv);
-
-       LDKChannelKeys ret = {
-               .this_arg = (void*) calls,
-               .get_per_commitment_point = get_per_commitment_point_jcall,
-               .release_commitment_secret = release_commitment_secret_jcall,
-               .key_derivation_params = key_derivation_params_jcall,
-               .sign_counterparty_commitment = sign_counterparty_commitment_jcall,
-               .sign_holder_commitment_and_htlcs = sign_holder_commitment_and_htlcs_jcall,
-               .sign_justice_transaction = sign_justice_transaction_jcall,
-               .sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_jcall,
-               .sign_closing_transaction = sign_closing_transaction_jcall,
-               .sign_channel_announcement = sign_channel_announcement_jcall,
-               .ready_channel = ready_channel_jcall,
-               .clone = LDKChannelKeys_JCalls_clone,
-               .write = write_jcall,
-               .free = LDKChannelKeys_JCalls_free,
-               .pubkeys = pubkeys_conv,
-               .set_pubkeys = NULL,
-       };
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateFailMalformedHTLC res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new(JNIEnv *env, jclass clz, jobject o, int64_t pubkeys) {
-       LDKChannelKeys *res_ptr = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *res_ptr = LDKChannelKeys_init(env, clz, o, pubkeys);
-       return (long)res_ptr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1get_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_arg, int64_t idx) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, (this_arg_conv->get_per_commitment_point)(this_arg_conv->this_arg, idx).compressed_form);
-       return arg_arr;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UpdateFeeDecodeErrorZ*)arg)->result_ok;
 }
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1release_1commitment_1secret(JNIEnv *env, jclass clz, int64_t this_arg, int64_t idx) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 32, (this_arg_conv->release_commitment_secret)(this_arg_conv->this_arg, idx).data);
-       return arg_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFeeDecodeErrorZ *val = (LDKCResult_UpdateFeeDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateFee res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1key_1derivation_1params(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKC2Tuple_u64u64Z* ret_ref = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       *ret_ref = (this_arg_conv->key_derivation_params)(this_arg_conv->this_arg);
-       return (long)ret_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFeeDecodeErrorZ *val = (LDKCResult_UpdateFeeDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1counterparty_1commitment(JNIEnv *env, jclass clz, int64_t this_arg, int64_t commitment_tx) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKCommitmentTransaction commitment_tx_conv;
-       commitment_tx_conv.inner = (void*)(commitment_tx & (~1));
-       commitment_tx_conv.is_owned = false;
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ), "LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ");
-       *ret_conv = (this_arg_conv->sign_counterparty_commitment)(this_arg_conv->this_arg, &commitment_tx_conv);
-       return (long)ret_conv;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)arg)->result_ok;
 }
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1holder_1commitment_1and_1htlcs(JNIEnv *env, jclass clz, int64_t this_arg, int64_t commitment_tx) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKHolderCommitmentTransaction commitment_tx_conv;
-       commitment_tx_conv.inner = (void*)(commitment_tx & (~1));
-       commitment_tx_conv.is_owned = false;
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ), "LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ");
-       *ret_conv = (this_arg_conv->sign_holder_commitment_and_htlcs)(this_arg_conv->this_arg, &commitment_tx_conv);
-       return (long)ret_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ *val = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateFulfillHTLC res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1justice_1transaction(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray justice_tx, int64_t input, int64_t amount, int8_tArray per_commitment_key, int64_t htlc) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKTransaction justice_tx_ref;
-       justice_tx_ref.datalen = (*env)->GetArrayLength(env, justice_tx);
-       justice_tx_ref.data = MALLOC(justice_tx_ref.datalen, "LDKTransaction Bytes");
-       (*env)->GetByteArrayRegion(env, justice_tx, 0, justice_tx_ref.datalen, justice_tx_ref.data);
-       justice_tx_ref.data_is_owned = true;
-       unsigned char per_commitment_key_arr[32];
-       CHECK((*env)->GetArrayLength(env, per_commitment_key) == 32);
-       (*env)->GetByteArrayRegion(env, per_commitment_key, 0, 32, per_commitment_key_arr);
-       unsigned char (*per_commitment_key_ref)[32] = &per_commitment_key_arr;
-       LDKHTLCOutputInCommitment htlc_conv;
-       htlc_conv.inner = (void*)(htlc & (~1));
-       htlc_conv.is_owned = false;
-       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
-       *ret_conv = (this_arg_conv->sign_justice_transaction)(this_arg_conv->this_arg, justice_tx_ref, input, amount, per_commitment_key_ref, &htlc_conv);
-       return (long)ret_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ *val = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1counterparty_1htlc_1transaction(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray htlc_tx, int64_t input, int64_t amount, int8_tArray per_commitment_point, int64_t htlc) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKTransaction htlc_tx_ref;
-       htlc_tx_ref.datalen = (*env)->GetArrayLength(env, htlc_tx);
-       htlc_tx_ref.data = MALLOC(htlc_tx_ref.datalen, "LDKTransaction Bytes");
-       (*env)->GetByteArrayRegion(env, htlc_tx, 0, htlc_tx_ref.datalen, htlc_tx_ref.data);
-       htlc_tx_ref.data_is_owned = true;
-       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);
-       LDKHTLCOutputInCommitment htlc_conv;
-       htlc_conv.inner = (void*)(htlc & (~1));
-       htlc_conv.is_owned = false;
-       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
-       *ret_conv = (this_arg_conv->sign_counterparty_htlc_transaction)(this_arg_conv->this_arg, htlc_tx_ref, input, amount, per_commitment_point_ref, &htlc_conv);
-       return (long)ret_conv;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UpdateAddHTLCDecodeErrorZ*)arg)->result_ok;
 }
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1closing_1transaction(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray closing_tx) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKTransaction closing_tx_ref;
-       closing_tx_ref.datalen = (*env)->GetArrayLength(env, closing_tx);
-       closing_tx_ref.data = MALLOC(closing_tx_ref.datalen, "LDKTransaction Bytes");
-       (*env)->GetByteArrayRegion(env, closing_tx, 0, closing_tx_ref.datalen, closing_tx_ref.data);
-       closing_tx_ref.data_is_owned = true;
-       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
-       *ret_conv = (this_arg_conv->sign_closing_transaction)(this_arg_conv->this_arg, closing_tx_ref);
-       return (long)ret_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ *val = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateAddHTLC res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1channel_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKUnsignedChannelAnnouncement msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
-       *ret_conv = (this_arg_conv->sign_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
-       return (long)ret_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ *val = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1ready_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_parameters) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKChannelTransactionParameters channel_parameters_conv;
-       channel_parameters_conv.inner = (void*)(channel_parameters & (~1));
-       channel_parameters_conv.is_owned = false;
-       (this_arg_conv->ready_channel)(this_arg_conv->this_arg, &channel_parameters_conv);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_PingDecodeErrorZ*)arg)->result_ok;
 }
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1write(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKCVec_u8Z arg_var = (this_arg_conv->write)(this_arg_conv->this_arg);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKPing res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-
-LDKChannelPublicKeys LDKChannelKeys_set_get_pubkeys(LDKChannelKeys* this_arg) {
-       if (this_arg->set_pubkeys != NULL)
-               this_arg->set_pubkeys(this_arg);
-       return this_arg->pubkeys;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1get_1pubkeys(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKChannelPublicKeys ret_var = LDKChannelKeys_set_get_pubkeys(this_arg_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_PongDecodeErrorZ*)arg)->result_ok;
 }
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
-       LDKC2Tuple_BlockHashChannelMonitorZ* ret = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
-       LDKThirtyTwoBytes a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 32);
-       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
-       ret->a = a_ref;
-       LDKChannelMonitor b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelMonitor_clone(&b_conv);
-       ret->b = b_conv;
-       return (long)ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKPong res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
-       LDKChannelMonitor b_var = tuple->b;
-       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long b_ref = (long)b_var.inner & ~1;
-       return b_ref;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUnsignedChannelAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelAnnouncementDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ *val = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       long res_ref = (long)(&(*val->contents.result)) | 1;
+       LDKChannelAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ *val = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -1789,17 +4234,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockH
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       long res_ref = ((long)&(*val->contents.result)) | 1;
+       LDKUnsignedChannelUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -1807,18 +4255,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutput
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ChanKeySignerDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ChannelUpdateDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ChanKeySignerDecodeErrorZ *val = (LDKCResult_ChanKeySignerDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelUpdateDecodeErrorZ *val = (LDKCResult_ChannelUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *ret = ChannelKeys_clone(&(*val->contents.result));
-       return (long)ret;
+       LDKChannelUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ChanKeySignerDecodeErrorZ *val = (LDKCResult_ChanKeySignerDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ChannelUpdateDecodeErrorZ *val = (LDKCResult_ChannelUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -1826,20 +4276,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDe
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_InMemoryChannelKeysDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ErrorMessageDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKInMemoryChannelKeys res_var = (*val->contents.result);
+       LDKErrorMessage res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -1847,266 +4297,161 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannel
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_TxOutAccessErrorZ*)arg)->result_ok;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TxOutAccessErrorZ *val = (LDKCResult_TxOutAccessErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       long res_ref = ((long)&(*val->contents.result)) | 1;
-       return (long)res_ref;
+       LDKUnsignedNodeAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TxOutAccessErrorZ *val = (LDKCResult_TxOutAccessErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       jclass err_conv = LDKAccessError_to_java(env, (*val->contents.err));
-       return err_conv;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-static jclass LDKAPIError_APIMisuseError_class = NULL;
-static jmethodID LDKAPIError_APIMisuseError_meth = NULL;
-static jclass LDKAPIError_FeeRateTooHigh_class = NULL;
-static jmethodID LDKAPIError_FeeRateTooHigh_meth = NULL;
-static jclass LDKAPIError_RouteError_class = NULL;
-static jmethodID LDKAPIError_RouteError_meth = NULL;
-static jclass LDKAPIError_ChannelUnavailable_class = NULL;
-static jmethodID LDKAPIError_ChannelUnavailable_meth = NULL;
-static jclass LDKAPIError_MonitorUpdateFailed_class = NULL;
-static jmethodID LDKAPIError_MonitorUpdateFailed_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKAPIError_init (JNIEnv *env, jclass clz) {
-       LDKAPIError_APIMisuseError_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAPIError$APIMisuseError;"));
-       CHECK(LDKAPIError_APIMisuseError_class != NULL);
-       LDKAPIError_APIMisuseError_meth = (*env)->GetMethodID(env, LDKAPIError_APIMisuseError_class, "<init>", "([B)V");
-       CHECK(LDKAPIError_APIMisuseError_meth != NULL);
-       LDKAPIError_FeeRateTooHigh_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAPIError$FeeRateTooHigh;"));
-       CHECK(LDKAPIError_FeeRateTooHigh_class != NULL);
-       LDKAPIError_FeeRateTooHigh_meth = (*env)->GetMethodID(env, LDKAPIError_FeeRateTooHigh_class, "<init>", "([BI)V");
-       CHECK(LDKAPIError_FeeRateTooHigh_meth != NULL);
-       LDKAPIError_RouteError_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAPIError$RouteError;"));
-       CHECK(LDKAPIError_RouteError_class != NULL);
-       LDKAPIError_RouteError_meth = (*env)->GetMethodID(env, LDKAPIError_RouteError_class, "<init>", "(Ljava/lang/String;)V");
-       CHECK(LDKAPIError_RouteError_meth != NULL);
-       LDKAPIError_ChannelUnavailable_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAPIError$ChannelUnavailable;"));
-       CHECK(LDKAPIError_ChannelUnavailable_class != NULL);
-       LDKAPIError_ChannelUnavailable_meth = (*env)->GetMethodID(env, LDKAPIError_ChannelUnavailable_class, "<init>", "([B)V");
-       CHECK(LDKAPIError_ChannelUnavailable_meth != NULL);
-       LDKAPIError_MonitorUpdateFailed_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKAPIError$MonitorUpdateFailed;"));
-       CHECK(LDKAPIError_MonitorUpdateFailed_class != NULL);
-       LDKAPIError_MonitorUpdateFailed_meth = (*env)->GetMethodID(env, LDKAPIError_MonitorUpdateFailed_class, "<init>", "()V");
-       CHECK(LDKAPIError_MonitorUpdateFailed_meth != NULL);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_NodeAnnouncementDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKAPIError *obj = (LDKAPIError*)ptr;
-       switch(obj->tag) {
-               case LDKAPIError_APIMisuseError: {
-                       LDKCVec_u8Z err_var = obj->api_misuse_error.err;
-                       int8_tArray err_arr = (*env)->NewByteArray(env, err_var.datalen);
-                       (*env)->SetByteArrayRegion(env, err_arr, 0, err_var.datalen, err_var.data);
-                       return (*env)->NewObject(env, LDKAPIError_APIMisuseError_class, LDKAPIError_APIMisuseError_meth, err_arr);
-               }
-               case LDKAPIError_FeeRateTooHigh: {
-                       LDKCVec_u8Z err_var = obj->fee_rate_too_high.err;
-                       int8_tArray err_arr = (*env)->NewByteArray(env, err_var.datalen);
-                       (*env)->SetByteArrayRegion(env, err_arr, 0, err_var.datalen, err_var.data);
-                       return (*env)->NewObject(env, LDKAPIError_FeeRateTooHigh_class, LDKAPIError_FeeRateTooHigh_meth, err_arr, obj->fee_rate_too_high.feerate);
-               }
-               case LDKAPIError_RouteError: {
-                       LDKStr err_str = obj->route_error.err;
-                       jstring err_conv = str_ref_to_java(env, err_str.chars, err_str.len);
-                       return (*env)->NewObject(env, LDKAPIError_RouteError_class, LDKAPIError_RouteError_meth, err_conv);
-               }
-               case LDKAPIError_ChannelUnavailable: {
-                       LDKCVec_u8Z err_var = obj->channel_unavailable.err;
-                       int8_tArray err_arr = (*env)->NewByteArray(env, err_var.datalen);
-                       (*env)->SetByteArrayRegion(env, err_arr, 0, err_var.datalen, err_var.data);
-                       return (*env)->NewObject(env, LDKAPIError_ChannelUnavailable_class, LDKAPIError_ChannelUnavailable_meth, err_arr);
-               }
-               case LDKAPIError_MonitorUpdateFailed: {
-                       return (*env)->NewObject(env, LDKAPIError_MonitorUpdateFailed_class, LDKAPIError_MonitorUpdateFailed_meth);
-               }
-               default: abort();
-       }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ *val = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NoneAPIErrorZ*)arg)->result_ok;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ *val = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneAPIErrorZ *val = (LDKCResult_NoneAPIErrorZ*)(arg & ~1);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_QueryShortChannelIdsDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKQueryShortChannelIds res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneAPIErrorZ *val = (LDKCResult_NoneAPIErrorZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       long err_ref = ((long)&(*val->contents.err)) | 1;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelDetailsZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_ChannelDetailsZ *ret = MALLOC(sizeof(LDKCVec_ChannelDetailsZ), "LDKCVec_ChannelDetailsZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKChannelDetails) * ret->datalen, "LDKCVec_ChannelDetailsZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKChannelDetails arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = ChannelDetails_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)arg)->result_ok;
 }
-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++) {
-               ret.data[i] = ChannelDetails_clone(&orig->data[i]);
-       }
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKReplyShortChannelIdsEnd res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NonePaymentSendFailureZ*)arg)->result_ok;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NonePaymentSendFailureZ *val = (LDKCResult_NonePaymentSendFailureZ*)(arg & ~1);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_QueryChannelRangeDecodeErrorZ*)arg)->result_ok;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKQueryChannelRange res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NonePaymentSendFailureZ *val = (LDKCResult_NonePaymentSendFailureZ*)(arg & ~1);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKPaymentSendFailure err_var = (*val->contents.err);
+       LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-static jclass LDKNetAddress_IPv4_class = NULL;
-static jmethodID LDKNetAddress_IPv4_meth = NULL;
-static jclass LDKNetAddress_IPv6_class = NULL;
-static jmethodID LDKNetAddress_IPv6_meth = NULL;
-static jclass LDKNetAddress_OnionV2_class = NULL;
-static jmethodID LDKNetAddress_OnionV2_meth = NULL;
-static jclass LDKNetAddress_OnionV3_class = NULL;
-static jmethodID LDKNetAddress_OnionV3_meth = NULL;
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKNetAddress_init (JNIEnv *env, jclass clz) {
-       LDKNetAddress_IPv4_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$IPv4;"));
-       CHECK(LDKNetAddress_IPv4_class != NULL);
-       LDKNetAddress_IPv4_meth = (*env)->GetMethodID(env, LDKNetAddress_IPv4_class, "<init>", "([BS)V");
-       CHECK(LDKNetAddress_IPv4_meth != NULL);
-       LDKNetAddress_IPv6_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$IPv6;"));
-       CHECK(LDKNetAddress_IPv6_class != NULL);
-       LDKNetAddress_IPv6_meth = (*env)->GetMethodID(env, LDKNetAddress_IPv6_class, "<init>", "([BS)V");
-       CHECK(LDKNetAddress_IPv6_meth != NULL);
-       LDKNetAddress_OnionV2_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$OnionV2;"));
-       CHECK(LDKNetAddress_OnionV2_class != NULL);
-       LDKNetAddress_OnionV2_meth = (*env)->GetMethodID(env, LDKNetAddress_OnionV2_class, "<init>", "([BS)V");
-       CHECK(LDKNetAddress_OnionV2_meth != NULL);
-       LDKNetAddress_OnionV3_class =
-               (*env)->NewGlobalRef(env, (*env)->FindClass(env, "Lorg/ldk/impl/bindings$LDKNetAddress$OnionV3;"));
-       CHECK(LDKNetAddress_OnionV3_class != NULL);
-       LDKNetAddress_OnionV3_meth = (*env)->GetMethodID(env, LDKNetAddress_OnionV3_class, "<init>", "([BSBS)V");
-       CHECK(LDKNetAddress_OnionV3_meth != NULL);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_ReplyChannelRangeDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKNetAddress_1ref_1from_1ptr(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKNetAddress *obj = (LDKNetAddress*)ptr;
-       switch(obj->tag) {
-               case LDKNetAddress_IPv4: {
-                       int8_tArray addr_arr = (*env)->NewByteArray(env, 4);
-                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 4, obj->i_pv4.addr.data);
-                       return (*env)->NewObject(env, LDKNetAddress_IPv4_class, LDKNetAddress_IPv4_meth, addr_arr, obj->i_pv4.port);
-               }
-               case LDKNetAddress_IPv6: {
-                       int8_tArray addr_arr = (*env)->NewByteArray(env, 16);
-                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 16, obj->i_pv6.addr.data);
-                       return (*env)->NewObject(env, LDKNetAddress_IPv6_class, LDKNetAddress_IPv6_meth, addr_arr, obj->i_pv6.port);
-               }
-               case LDKNetAddress_OnionV2: {
-                       int8_tArray addr_arr = (*env)->NewByteArray(env, 10);
-                       (*env)->SetByteArrayRegion(env, addr_arr, 0, 10, obj->onion_v2.addr.data);
-                       return (*env)->NewObject(env, LDKNetAddress_OnionV2_class, LDKNetAddress_OnionV2_meth, addr_arr, obj->onion_v2.port);
-               }
-               case LDKNetAddress_OnionV3: {
-                       int8_tArray ed25519_pubkey_arr = (*env)->NewByteArray(env, 32);
-                       (*env)->SetByteArrayRegion(env, ed25519_pubkey_arr, 0, 32, obj->onion_v3.ed25519_pubkey.data);
-                       return (*env)->NewObject(env, LDKNetAddress_OnionV3_class, LDKNetAddress_OnionV3_meth, ed25519_pubkey_arr, obj->onion_v3.checksum, obj->onion_v3.version, obj->onion_v3.port);
-               }
-               default: abort();
-       }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKReplyChannelRange res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NetAddressZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_NetAddressZ *ret = MALLOC(sizeof(LDKCVec_NetAddressZ), "LDKCVec_NetAddressZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKNetAddress) * ret->datalen, "LDKCVec_NetAddressZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKNetAddress arr_elem_conv = *(LDKNetAddress*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-static inline LDKCVec_NetAddressZ CVec_NetAddressZ_clone(const LDKCVec_NetAddressZ *orig) {
-       LDKCVec_NetAddressZ ret = { .data = MALLOC(sizeof(LDKNetAddress) * orig->datalen, "LDKCVec_NetAddressZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = NetAddress_clone(&orig->data[i]);
-       }
-       return ret;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       return ((LDKCResult_GossipTimestampFilterDecodeErrorZ*)arg)->result_ok;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelMonitorZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_ChannelMonitorZ *ret = MALLOC(sizeof(LDKCVec_ChannelMonitorZ), "LDKCVec_ChannelMonitorZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKChannelMonitor) * ret->datalen, "LDKCVec_ChannelMonitorZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKChannelMonitor arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = ChannelMonitor_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKGossipTimestampFilter res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-static inline LDKCVec_ChannelMonitorZ CVec_ChannelMonitorZ_clone(const LDKCVec_ChannelMonitorZ *orig) {
-       LDKCVec_ChannelMonitorZ ret = { .data = MALLOC(sizeof(LDKChannelMonitor) * orig->datalen, "LDKCVec_ChannelMonitorZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = ChannelMonitor_clone(&orig->data[i]);
-       }
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-typedef struct LDKWatch_JCalls {
+typedef struct LDKMessageSendEventsProvider_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
        jweak o;
-       jmethodID watch_channel_meth;
-       jmethodID update_channel_meth;
-       jmethodID release_pending_monitor_events_meth;
-} LDKWatch_JCalls;
-static void LDKWatch_JCalls_free(void* this_arg) {
-       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       jmethodID get_and_clear_pending_msg_events_meth;
+} LDKMessageSendEventsProvider_JCalls;
+static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
                JNIEnv *env;
                DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
@@ -2114,172 +4459,161 @@ static void LDKWatch_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
-       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKOutPoint funding_txo_var = funding_txo;
-       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long funding_txo_ref = (long)funding_txo_var.inner;
-       if (funding_txo_var.is_owned) {
-               funding_txo_ref |= 1;
-       }
-       LDKChannelMonitor monitor_var = monitor;
-       CHECK((((long)monitor_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&monitor_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long monitor_ref = (long)monitor_var.inner;
-       if (monitor_var.is_owned) {
-               monitor_ref |= 1;
-       }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->watch_channel_meth, funding_txo_ref, monitor_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
-       return ret_conv;
+       int64_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->get_and_clear_pending_msg_events_meth);
+       LDKCVec_MessageSendEventZ ret_constr;
+       ret_constr.datalen = (*env)->GetArrayLength(env, ret);
+       if (ret_constr.datalen > 0)
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+       else
+               ret_constr.data = NULL;
+       int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
+       for (size_t s = 0; s < ret_constr.datalen; s++) {
+               int64_t ret_conv_18 = ret_vals[s];
+               LDKMessageSendEvent ret_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)ret_conv_18) & ~1);
+               ret_conv_18_conv = MessageSendEvent_clone((LDKMessageSendEvent*)ret_conv_18);
+               ret_constr.data[s] = ret_conv_18_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
+       return ret_constr;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
-       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKOutPoint funding_txo_var = funding_txo;
-       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long funding_txo_ref = (long)funding_txo_var.inner;
-       if (funding_txo_var.is_owned) {
-               funding_txo_ref |= 1;
+static void* LDKMessageSendEventsProvider_JCalls_clone(const void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKMessageSendEventsProvider LDKMessageSendEventsProvider_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKMessageSendEventsProvider_JCalls *calls = MALLOC(sizeof(LDKMessageSendEventsProvider_JCalls), "LDKMessageSendEventsProvider_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->get_and_clear_pending_msg_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_msg_events", "()[J");
+       CHECK(calls->get_and_clear_pending_msg_events_meth != NULL);
+
+       LDKMessageSendEventsProvider ret = {
+               .this_arg = (void*) calls,
+               .get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall,
+               .free = LDKMessageSendEventsProvider_JCalls_free,
+       };
+       return ret;
+}
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKMessageSendEventsProvider *res_ptr = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
+       *res_ptr = LDKMessageSendEventsProvider_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1get_1and_1clear_1pending_1msg_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKMessageSendEventsProvider* this_arg_conv = (LDKMessageSendEventsProvider*)this_arg;
+       LDKCVec_MessageSendEventZ ret_var = (this_arg_conv->get_and_clear_pending_msg_events)(this_arg_conv->this_arg);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t s = 0; s < ret_var.datalen; s++) {
+               LDKMessageSendEvent *ret_conv_18_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
+               *ret_conv_18_copy = MessageSendEvent_clone(&ret_var.data[s]);
+               long ret_conv_18_ref = (long)ret_conv_18_copy;
+               ret_arr_ptr[s] = ret_conv_18_ref;
        }
-       LDKChannelMonitorUpdate update_var = update;
-       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long update_ref = (long)update_var.inner;
-       if (update_var.is_owned) {
-               update_ref |= 1;
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+typedef struct LDKEventsProvider_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID get_and_clear_pending_events_meth;
+} LDKEventsProvider_JCalls;
+static void LDKEventsProvider_JCalls_free(void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
        }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->update_channel_meth, funding_txo_ref, update_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
-       return ret_conv;
 }
-LDKCVec_MonitorEventZ release_pending_monitor_events_jcall(const void* this_arg) {
-       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->release_pending_monitor_events_meth);
-       LDKCVec_MonitorEventZ arg_constr;
-       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+       int64_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->get_and_clear_pending_events_meth);
+       LDKCVec_EventZ ret_constr;
+       ret_constr.datalen = (*env)->GetArrayLength(env, ret);
+       if (ret_constr.datalen > 0)
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
        else
-               arg_constr.data = NULL;
-       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
-       for (size_t o = 0; o < arg_constr.datalen; o++) {
-               int64_t arr_conv_14 = arg_vals[o];
-               LDKMonitorEvent arr_conv_14_conv;
-               arr_conv_14_conv.inner = (void*)(arr_conv_14 & (~1));
-               arr_conv_14_conv.is_owned = (arr_conv_14 & 1) || (arr_conv_14 == 0);
-               arr_conv_14_conv = MonitorEvent_clone(&arr_conv_14_conv);
-               arg_constr.data[o] = arr_conv_14_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
-       return arg_constr;
-}
-static void* LDKWatch_JCalls_clone(const void* this_arg) {
-       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+               ret_constr.data = NULL;
+       int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
+       for (size_t h = 0; h < ret_constr.datalen; h++) {
+               int64_t ret_conv_7 = ret_vals[h];
+               LDKEvent ret_conv_7_conv = *(LDKEvent*)(((uint64_t)ret_conv_7) & ~1);
+               ret_conv_7_conv = Event_clone((LDKEvent*)ret_conv_7);
+               ret_constr.data[h] = ret_conv_7_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
+       return ret_constr;
+}
+static void* LDKEventsProvider_JCalls_clone(const void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
        return (void*) this_arg;
 }
-static inline LDKWatch LDKWatch_init (JNIEnv *env, jclass clz, jobject o) {
+static inline LDKEventsProvider LDKEventsProvider_init (JNIEnv *env, jclass clz, jobject o) {
        jclass c = (*env)->GetObjectClass(env, o);
        CHECK(c != NULL);
-       LDKWatch_JCalls *calls = MALLOC(sizeof(LDKWatch_JCalls), "LDKWatch_JCalls");
+       LDKEventsProvider_JCalls *calls = MALLOC(sizeof(LDKEventsProvider_JCalls), "LDKEventsProvider_JCalls");
        atomic_init(&calls->refcnt, 1);
        DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
        calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->watch_channel_meth = (*env)->GetMethodID(env, c, "watch_channel", "(JJ)J");
-       CHECK(calls->watch_channel_meth != NULL);
-       calls->update_channel_meth = (*env)->GetMethodID(env, c, "update_channel", "(JJ)J");
-       CHECK(calls->update_channel_meth != NULL);
-       calls->release_pending_monitor_events_meth = (*env)->GetMethodID(env, c, "release_pending_monitor_events", "()[J");
-       CHECK(calls->release_pending_monitor_events_meth != NULL);
+       calls->get_and_clear_pending_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_events", "()[J");
+       CHECK(calls->get_and_clear_pending_events_meth != NULL);
 
-       LDKWatch ret = {
+       LDKEventsProvider ret = {
                .this_arg = (void*) calls,
-               .watch_channel = watch_channel_jcall,
-               .update_channel = update_channel_jcall,
-               .release_pending_monitor_events = release_pending_monitor_events_jcall,
-               .free = LDKWatch_JCalls_free,
+               .get_and_clear_pending_events = get_and_clear_pending_events_jcall,
+               .free = LDKEventsProvider_JCalls_free,
        };
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKWatch *res_ptr = MALLOC(sizeof(LDKWatch), "LDKWatch");
-       *res_ptr = LDKWatch_init(env, clz, o);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKEventsProvider *res_ptr = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
+       *res_ptr = LDKEventsProvider_init(env, clz, o);
        return (long)res_ptr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t funding_txo, int64_t monitor) {
-       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
-       LDKOutPoint funding_txo_conv;
-       funding_txo_conv.inner = (void*)(funding_txo & (~1));
-       funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
-       funding_txo_conv = OutPoint_clone(&funding_txo_conv);
-       LDKChannelMonitor monitor_conv;
-       monitor_conv.inner = (void*)(monitor & (~1));
-       monitor_conv.is_owned = (monitor & 1) || (monitor == 0);
-       monitor_conv = ChannelMonitor_clone(&monitor_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv);
-       return (long)ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t funding_txo, int64_t update) {
-       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
-       LDKOutPoint funding_txo_conv;
-       funding_txo_conv.inner = (void*)(funding_txo & (~1));
-       funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
-       funding_txo_conv = OutPoint_clone(&funding_txo_conv);
-       LDKChannelMonitorUpdate update_conv;
-       update_conv.inner = (void*)(update & (~1));
-       update_conv.is_owned = (update & 1) || (update == 0);
-       update_conv = ChannelMonitorUpdate_clone(&update_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv);
-       return (long)ret_conv;
-}
-
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pending_1monitor_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
-       LDKCVec_MonitorEventZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_EventsProvider_1get_1and_1clear_1pending_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKEventsProvider* this_arg_conv = (LDKEventsProvider*)this_arg;
+       LDKCVec_EventZ ret_var = (this_arg_conv->get_and_clear_pending_events)(this_arg_conv->this_arg);
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t o = 0; o < ret_var.datalen; o++) {
-               LDKMonitorEvent arr_conv_14_var = ret_var.data[o];
-               CHECK((((long)arr_conv_14_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_14_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_14_ref = (long)arr_conv_14_var.inner;
-               if (arr_conv_14_var.is_owned) {
-                       arr_conv_14_ref |= 1;
-               }
-               ret_arr_ptr[o] = arr_conv_14_ref;
+       for (size_t h = 0; h < ret_var.datalen; h++) {
+               LDKEvent *ret_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
+               *ret_conv_7_copy = Event_clone(&ret_var.data[h]);
+               long ret_conv_7_ref = (long)ret_conv_7_copy;
+               ret_arr_ptr[h] = ret_conv_7_ref;
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
        return ret_arr;
 }
 
-typedef struct LDKBroadcasterInterface_JCalls {
+typedef struct LDKAccess_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
        jweak o;
-       jmethodID broadcast_transaction_meth;
-} LDKBroadcasterInterface_JCalls;
-static void LDKBroadcasterInterface_JCalls_free(void* this_arg) {
-       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
+       jmethodID get_utxo_meth;
+} LDKAccess_JCalls;
+static void LDKAccess_JCalls_free(void* this_arg) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
                JNIEnv *env;
                DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
@@ -2287,68 +4621,66 @@ static void LDKBroadcasterInterface_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-void broadcast_transaction_jcall(const void* this_arg, LDKTransaction tx) {
-       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
+LDKCResult_TxOutAccessErrorZ get_utxo_jcall(const void* this_arg, const uint8_t (* genesis_hash)[32], uint64_t short_channel_id) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKTransaction tx_var = tx;
-       int8_tArray tx_arr = (*env)->NewByteArray(env, tx_var.datalen);
-       (*env)->SetByteArrayRegion(env, tx_arr, 0, tx_var.datalen, tx_var.data);
-       Transaction_free(tx_var);
+       int8_tArray genesis_hash_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, genesis_hash_arr, 0, 32, *genesis_hash);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->broadcast_transaction_meth, tx_arr);
+       LDKCResult_TxOutAccessErrorZ* ret = (LDKCResult_TxOutAccessErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->get_utxo_meth, genesis_hash_arr, short_channel_id);
+       LDKCResult_TxOutAccessErrorZ ret_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_TxOutAccessErrorZ_clone((LDKCResult_TxOutAccessErrorZ*)ret);
+       return ret_conv;
 }
-static void* LDKBroadcasterInterface_JCalls_clone(const void* this_arg) {
-       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
+static void* LDKAccess_JCalls_clone(const void* this_arg) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
        return (void*) this_arg;
 }
-static inline LDKBroadcasterInterface LDKBroadcasterInterface_init (JNIEnv *env, jclass clz, jobject o) {
+static inline LDKAccess LDKAccess_init (JNIEnv *env, jclass clz, jobject o) {
        jclass c = (*env)->GetObjectClass(env, o);
        CHECK(c != NULL);
-       LDKBroadcasterInterface_JCalls *calls = MALLOC(sizeof(LDKBroadcasterInterface_JCalls), "LDKBroadcasterInterface_JCalls");
+       LDKAccess_JCalls *calls = MALLOC(sizeof(LDKAccess_JCalls), "LDKAccess_JCalls");
        atomic_init(&calls->refcnt, 1);
        DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
        calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->broadcast_transaction_meth = (*env)->GetMethodID(env, c, "broadcast_transaction", "([B)V");
-       CHECK(calls->broadcast_transaction_meth != NULL);
+       calls->get_utxo_meth = (*env)->GetMethodID(env, c, "get_utxo", "([BJ)J");
+       CHECK(calls->get_utxo_meth != NULL);
 
-       LDKBroadcasterInterface ret = {
+       LDKAccess ret = {
                .this_arg = (void*) calls,
-               .broadcast_transaction = broadcast_transaction_jcall,
-               .free = LDKBroadcasterInterface_JCalls_free,
+               .get_utxo = get_utxo_jcall,
+               .free = LDKAccess_JCalls_free,
        };
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKBroadcasterInterface *res_ptr = MALLOC(sizeof(LDKBroadcasterInterface), "LDKBroadcasterInterface");
-       *res_ptr = LDKBroadcasterInterface_init(env, clz, o);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKAccess_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKAccess *res_ptr = MALLOC(sizeof(LDKAccess), "LDKAccess");
+       *res_ptr = LDKAccess_init(env, clz, o);
        return (long)res_ptr;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1broadcast_1transaction(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray tx) {
-       LDKBroadcasterInterface* this_arg_conv = (LDKBroadcasterInterface*)this_arg;
-       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;
-       (this_arg_conv->broadcast_transaction)(this_arg_conv->this_arg, tx_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Access_1get_1utxo(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray genesis_hash, int64_t short_channel_id) {
+       LDKAccess* this_arg_conv = (LDKAccess*)this_arg;
+       unsigned char genesis_hash_arr[32];
+       CHECK((*env)->GetArrayLength(env, genesis_hash) == 32);
+       (*env)->GetByteArrayRegion(env, genesis_hash, 0, 32, genesis_hash_arr);
+       unsigned char (*genesis_hash_ref)[32] = &genesis_hash_arr;
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = (this_arg_conv->get_utxo)(this_arg_conv->this_arg, genesis_hash_ref, short_channel_id);
+       return (long)ret_conv;
 }
 
-typedef struct LDKKeysInterface_JCalls {
+typedef struct LDKListen_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
        jweak o;
-       jmethodID get_node_secret_meth;
-       jmethodID get_destination_script_meth;
-       jmethodID get_shutdown_pubkey_meth;
-       jmethodID get_channel_keys_meth;
-       jmethodID get_secure_random_bytes_meth;
-       jmethodID read_chan_signer_meth;
-} LDKKeysInterface_JCalls;
-static void LDKKeysInterface_JCalls_free(void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       jmethodID block_connected_meth;
+       jmethodID block_disconnected_meth;
+} LDKListen_JCalls;
+static void LDKListen_JCalls_free(void* this_arg) {
+       LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
                JNIEnv *env;
                DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
@@ -2356,178 +4688,187 @@ static void LDKKeysInterface_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-LDKSecretKey get_node_secret_jcall(const void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+void block_connected_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
+       LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKu8slice block_var = block;
+       int8_tArray block_arr = (*env)->NewByteArray(env, block_var.datalen);
+       (*env)->SetByteArrayRegion(env, block_arr, 0, block_var.datalen, block_var.data);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       int8_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_node_secret_meth);
-       LDKSecretKey arg_ref;
-       CHECK((*env)->GetArrayLength(env, arg) == 32);
-       (*env)->GetByteArrayRegion(env, arg, 0, 32, arg_ref.bytes);
-       return arg_ref;
+       return (*env)->CallVoidMethod(env, obj, j_calls->block_connected_meth, block_arr, height);
 }
-LDKCVec_u8Z get_destination_script_jcall(const void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+void block_disconnected_jcall(const void* this_arg, const uint8_t (* header)[80], uint32_t height) {
+       LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray header_arr = (*env)->NewByteArray(env, 80);
+       (*env)->SetByteArrayRegion(env, header_arr, 0, 80, *header);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       int8_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_destination_script_meth);
-       LDKCVec_u8Z arg_ref;
-       arg_ref.datalen = (*env)->GetArrayLength(env, arg);
-       arg_ref.data = MALLOC(arg_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, arg, 0, arg_ref.datalen, arg_ref.data);
-       return arg_ref;
+       return (*env)->CallVoidMethod(env, obj, j_calls->block_disconnected_meth, header_arr, height);
 }
-LDKPublicKey get_shutdown_pubkey_jcall(const void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       int8_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_shutdown_pubkey_meth);
-       LDKPublicKey arg_ref;
-       CHECK((*env)->GetArrayLength(env, arg) == 33);
-       (*env)->GetByteArrayRegion(env, arg, 0, 33, arg_ref.compressed_form);
-       return arg_ref;
+static void* LDKListen_JCalls_clone(const void* this_arg) {
+       LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-LDKChannelKeys get_channel_keys_jcall(const void* this_arg, bool inbound, uint64_t channel_value_satoshis) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKChannelKeys* ret = (LDKChannelKeys*)(*env)->CallLongMethod(env, obj, j_calls->get_channel_keys_meth, inbound, channel_value_satoshis);
-       LDKChannelKeys ret_conv = *(LDKChannelKeys*)(((uint64_t)ret) & ~1);
-       ret_conv = ChannelKeys_clone(ret);
-       return ret_conv;
+static inline LDKListen LDKListen_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKListen_JCalls *calls = MALLOC(sizeof(LDKListen_JCalls), "LDKListen_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->block_connected_meth = (*env)->GetMethodID(env, c, "block_connected", "([BI)V");
+       CHECK(calls->block_connected_meth != NULL);
+       calls->block_disconnected_meth = (*env)->GetMethodID(env, c, "block_disconnected", "([BI)V");
+       CHECK(calls->block_disconnected_meth != NULL);
+
+       LDKListen ret = {
+               .this_arg = (void*) calls,
+               .block_connected = block_connected_jcall,
+               .block_disconnected = block_disconnected_jcall,
+               .free = LDKListen_JCalls_free,
+       };
+       return ret;
 }
-LDKThirtyTwoBytes get_secure_random_bytes_jcall(const void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKListen_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKListen *res_ptr = MALLOC(sizeof(LDKListen), "LDKListen");
+       *res_ptr = LDKListen_init(env, clz, o);
+       return (long)res_ptr;
+}
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1block_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray block, int32_t height) {
+       LDKListen* this_arg_conv = (LDKListen*)this_arg;
+       LDKu8slice block_ref;
+       block_ref.datalen = (*env)->GetArrayLength(env, block);
+       block_ref.data = (*env)->GetByteArrayElements (env, block, NULL);
+       (this_arg_conv->block_connected)(this_arg_conv->this_arg, block_ref, height);
+       (*env)->ReleaseByteArrayElements(env, block, (int8_t*)block_ref.data, 0);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1block_1disconnected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray header, int32_t height) {
+       LDKListen* this_arg_conv = (LDKListen*)this_arg;
+       unsigned char header_arr[80];
+       CHECK((*env)->GetArrayLength(env, header) == 80);
+       (*env)->GetByteArrayRegion(env, header, 0, 80, header_arr);
+       unsigned char (*header_ref)[80] = &header_arr;
+       (this_arg_conv->block_disconnected)(this_arg_conv->this_arg, header_ref, height);
+}
+
+typedef struct LDKFilter_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID register_tx_meth;
+       jmethodID register_output_meth;
+} LDKFilter_JCalls;
+static void LDKFilter_JCalls_free(void* this_arg) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
+}
+void register_tx_jcall(const void* this_arg, const uint8_t (* txid)[32], LDKu8slice script_pubkey) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray txid_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, txid_arr, 0, 32, *txid);
+       LDKu8slice script_pubkey_var = script_pubkey;
+       int8_tArray script_pubkey_arr = (*env)->NewByteArray(env, script_pubkey_var.datalen);
+       (*env)->SetByteArrayRegion(env, script_pubkey_arr, 0, script_pubkey_var.datalen, script_pubkey_var.data);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       int8_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_secure_random_bytes_meth);
-       LDKThirtyTwoBytes arg_ref;
-       CHECK((*env)->GetArrayLength(env, arg) == 32);
-       (*env)->GetByteArrayRegion(env, arg, 0, 32, arg_ref.data);
-       return arg_ref;
+       return (*env)->CallVoidMethod(env, obj, j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
 }
-LDKCResult_ChanKeySignerDecodeErrorZ read_chan_signer_jcall(const void* this_arg, LDKu8slice reader) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+void register_output_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKu8slice reader_var = reader;
-       int8_tArray reader_arr = (*env)->NewByteArray(env, reader_var.datalen);
-       (*env)->SetByteArrayRegion(env, reader_arr, 0, reader_var.datalen, reader_var.data);
+       LDKOutPoint outpoint_var = *outpoint;
+       outpoint_var = OutPoint_clone(outpoint);
+       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long outpoint_ref = (long)outpoint_var.inner;
+       if (outpoint_var.is_owned) {
+               outpoint_ref |= 1;
+       }
+       LDKu8slice script_pubkey_var = script_pubkey;
+       int8_tArray script_pubkey_arr = (*env)->NewByteArray(env, script_pubkey_var.datalen);
+       (*env)->SetByteArrayRegion(env, script_pubkey_arr, 0, script_pubkey_var.datalen, script_pubkey_var.data);
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret = (LDKCResult_ChanKeySignerDecodeErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->read_chan_signer_meth, reader_arr);
-       LDKCResult_ChanKeySignerDecodeErrorZ ret_conv = *(LDKCResult_ChanKeySignerDecodeErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_ChanKeySignerDecodeErrorZ_clone((LDKCResult_ChanKeySignerDecodeErrorZ*)ret);
-       return ret_conv;
+       return (*env)->CallVoidMethod(env, obj, j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
 }
-static void* LDKKeysInterface_JCalls_clone(const void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+static void* LDKFilter_JCalls_clone(const void* this_arg) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
        return (void*) this_arg;
 }
-static inline LDKKeysInterface LDKKeysInterface_init (JNIEnv *env, jclass clz, jobject o) {
+static inline LDKFilter LDKFilter_init (JNIEnv *env, jclass clz, jobject o) {
        jclass c = (*env)->GetObjectClass(env, o);
        CHECK(c != NULL);
-       LDKKeysInterface_JCalls *calls = MALLOC(sizeof(LDKKeysInterface_JCalls), "LDKKeysInterface_JCalls");
+       LDKFilter_JCalls *calls = MALLOC(sizeof(LDKFilter_JCalls), "LDKFilter_JCalls");
        atomic_init(&calls->refcnt, 1);
        DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
        calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->get_node_secret_meth = (*env)->GetMethodID(env, c, "get_node_secret", "()[B");
-       CHECK(calls->get_node_secret_meth != NULL);
-       calls->get_destination_script_meth = (*env)->GetMethodID(env, c, "get_destination_script", "()[B");
-       CHECK(calls->get_destination_script_meth != NULL);
-       calls->get_shutdown_pubkey_meth = (*env)->GetMethodID(env, c, "get_shutdown_pubkey", "()[B");
-       CHECK(calls->get_shutdown_pubkey_meth != NULL);
-       calls->get_channel_keys_meth = (*env)->GetMethodID(env, c, "get_channel_keys", "(ZJ)J");
-       CHECK(calls->get_channel_keys_meth != NULL);
-       calls->get_secure_random_bytes_meth = (*env)->GetMethodID(env, c, "get_secure_random_bytes", "()[B");
-       CHECK(calls->get_secure_random_bytes_meth != NULL);
-       calls->read_chan_signer_meth = (*env)->GetMethodID(env, c, "read_chan_signer", "([B)J");
-       CHECK(calls->read_chan_signer_meth != NULL);
+       calls->register_tx_meth = (*env)->GetMethodID(env, c, "register_tx", "([B[B)V");
+       CHECK(calls->register_tx_meth != NULL);
+       calls->register_output_meth = (*env)->GetMethodID(env, c, "register_output", "(J[B)V");
+       CHECK(calls->register_output_meth != NULL);
 
-       LDKKeysInterface ret = {
+       LDKFilter ret = {
                .this_arg = (void*) calls,
-               .get_node_secret = get_node_secret_jcall,
-               .get_destination_script = get_destination_script_jcall,
-               .get_shutdown_pubkey = get_shutdown_pubkey_jcall,
-               .get_channel_keys = get_channel_keys_jcall,
-               .get_secure_random_bytes = get_secure_random_bytes_jcall,
-               .read_chan_signer = read_chan_signer_jcall,
-               .free = LDKKeysInterface_JCalls_free,
+               .register_tx = register_tx_jcall,
+               .register_output = register_output_jcall,
+               .free = LDKFilter_JCalls_free,
        };
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKKeysInterface *res_ptr = MALLOC(sizeof(LDKKeysInterface), "LDKKeysInterface");
-       *res_ptr = LDKKeysInterface_init(env, clz, o);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFilter_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKFilter *res_ptr = MALLOC(sizeof(LDKFilter), "LDKFilter");
+       *res_ptr = LDKFilter_init(env, clz, o);
        return (long)res_ptr;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1secret(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 32, (this_arg_conv->get_node_secret)(this_arg_conv->this_arg).bytes);
-       return arg_arr;
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1destination_1script(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       LDKCVec_u8Z arg_var = (this_arg_conv->get_destination_script)(this_arg_conv->this_arg);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1shutdown_1pubkey(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, (this_arg_conv->get_shutdown_pubkey)(this_arg_conv->this_arg).compressed_form);
-       return arg_arr;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1channel_1keys(JNIEnv *env, jclass clz, int64_t this_arg, jboolean inbound, int64_t channel_value_satoshis) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *ret = (this_arg_conv->get_channel_keys)(this_arg_conv->this_arg, inbound, channel_value_satoshis);
-       return (long)ret;
-}
-
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1secure_1random_1bytes(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 32, (this_arg_conv->get_secure_random_bytes)(this_arg_conv->this_arg).data);
-       return arg_arr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1tx(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray txid, int8_tArray script_pubkey) {
+       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
+       unsigned char txid_arr[32];
+       CHECK((*env)->GetArrayLength(env, txid) == 32);
+       (*env)->GetByteArrayRegion(env, txid, 0, 32, txid_arr);
+       unsigned char (*txid_ref)[32] = &txid_arr;
+       LDKu8slice script_pubkey_ref;
+       script_pubkey_ref.datalen = (*env)->GetArrayLength(env, script_pubkey);
+       script_pubkey_ref.data = (*env)->GetByteArrayElements (env, script_pubkey, NULL);
+       (this_arg_conv->register_tx)(this_arg_conv->this_arg, txid_ref, script_pubkey_ref);
+       (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysInterface_1read_1chan_1signer(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray reader) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       LDKu8slice reader_ref;
-       reader_ref.datalen = (*env)->GetArrayLength(env, reader);
-       reader_ref.data = (*env)->GetByteArrayElements (env, reader, NULL);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = (this_arg_conv->read_chan_signer)(this_arg_conv->this_arg, reader_ref);
-       (*env)->ReleaseByteArrayElements(env, reader, (int8_t*)reader_ref.data, 0);
-       return (long)ret_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output(JNIEnv *env, jclass clz, int64_t this_arg, int64_t outpoint, int8_tArray script_pubkey) {
+       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
+       LDKOutPoint outpoint_conv;
+       outpoint_conv.inner = (void*)(outpoint & (~1));
+       outpoint_conv.is_owned = false;
+       LDKu8slice script_pubkey_ref;
+       script_pubkey_ref.datalen = (*env)->GetArrayLength(env, script_pubkey);
+       script_pubkey_ref.data = (*env)->GetByteArrayElements (env, script_pubkey, NULL);
+       (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
+       (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
 }
 
-typedef struct LDKFeeEstimator_JCalls {
+typedef struct LDKPersist_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
        jweak o;
-       jmethodID get_est_sat_per_1000_weight_meth;
-} LDKFeeEstimator_JCalls;
-static void LDKFeeEstimator_JCalls_free(void* this_arg) {
-       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
+       jmethodID persist_new_channel_meth;
+       jmethodID update_persisted_channel_meth;
+} 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) {
                JNIEnv *env;
                DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
@@ -2535,57 +4876,154 @@ static void LDKFeeEstimator_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-uint32_t get_est_sat_per_1000_weight_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
-       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
+LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitor * data) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jclass confirmation_target_conv = LDKConfirmationTarget_to_java(env, confirmation_target);
+       LDKOutPoint id_var = id;
+       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long id_ref = (long)id_var.inner;
+       if (id_var.is_owned) {
+               id_ref |= 1;
+       }
+       LDKChannelMonitor data_var = *data;
+       data_var = ChannelMonitor_clone(data);
+       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long data_ref = (long)data_var.inner;
+       if (data_var.is_owned) {
+               data_ref |= 1;
+       }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallIntMethod(env, obj, j_calls->get_est_sat_per_1000_weight_meth, confirmation_target_conv);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->persist_new_channel_meth, id_ref, data_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
 }
-static void* LDKFeeEstimator_JCalls_clone(const void* this_arg) {
-       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
+LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKOutPoint id_var = id;
+       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long id_ref = (long)id_var.inner;
+       if (id_var.is_owned) {
+               id_ref |= 1;
+       }
+       LDKChannelMonitorUpdate update_var = *update;
+       update_var = ChannelMonitorUpdate_clone(update);
+       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long update_ref = (long)update_var.inner;
+       if (update_var.is_owned) {
+               update_ref |= 1;
+       }
+       LDKChannelMonitor data_var = *data;
+       data_var = ChannelMonitor_clone(data);
+       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long data_ref = (long)data_var.inner;
+       if (data_var.is_owned) {
+               data_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->update_persisted_channel_meth, id_ref, update_ref, data_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
+}
+static void* LDKPersist_JCalls_clone(const void* this_arg) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
        return (void*) this_arg;
 }
-static inline LDKFeeEstimator LDKFeeEstimator_init (JNIEnv *env, jclass clz, jobject o) {
+static inline LDKPersist LDKPersist_init (JNIEnv *env, jclass clz, jobject o) {
        jclass c = (*env)->GetObjectClass(env, o);
        CHECK(c != NULL);
-       LDKFeeEstimator_JCalls *calls = MALLOC(sizeof(LDKFeeEstimator_JCalls), "LDKFeeEstimator_JCalls");
+       LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls");
        atomic_init(&calls->refcnt, 1);
        DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
        calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->get_est_sat_per_1000_weight_meth = (*env)->GetMethodID(env, c, "get_est_sat_per_1000_weight", "(Lorg/ldk/enums/LDKConfirmationTarget;)I");
-       CHECK(calls->get_est_sat_per_1000_weight_meth != NULL);
+       calls->persist_new_channel_meth = (*env)->GetMethodID(env, c, "persist_new_channel", "(JJ)J");
+       CHECK(calls->persist_new_channel_meth != NULL);
+       calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJ)J");
+       CHECK(calls->update_persisted_channel_meth != NULL);
 
-       LDKFeeEstimator ret = {
+       LDKPersist ret = {
                .this_arg = (void*) calls,
-               .get_est_sat_per_1000_weight = get_est_sat_per_1000_weight_jcall,
-               .free = LDKFeeEstimator_JCalls_free,
+               .persist_new_channel = persist_new_channel_jcall,
+               .update_persisted_channel = update_persisted_channel_jcall,
+               .free = LDKPersist_JCalls_free,
        };
        return ret;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKFeeEstimator *res_ptr = MALLOC(sizeof(LDKFeeEstimator), "LDKFeeEstimator");
-       *res_ptr = LDKFeeEstimator_init(env, clz, o);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist");
+       *res_ptr = LDKPersist_init(env, clz, o);
        return (long)res_ptr;
 }
-JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1get_1est_1sat_1per_11000_1weight(JNIEnv *env, jclass clz, int64_t this_arg, jclass confirmation_target) {
-       LDKFeeEstimator* this_arg_conv = (LDKFeeEstimator*)this_arg;
-       LDKConfirmationTarget confirmation_target_conv = LDKConfirmationTarget_from_java(env, confirmation_target);
-       int32_t ret_val = (this_arg_conv->get_est_sat_per_1000_weight)(this_arg_conv->this_arg, confirmation_target_conv);
-       return ret_val;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t id, int64_t data) {
+       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
+       LDKOutPoint id_conv;
+       id_conv.inner = (void*)(id & (~1));
+       id_conv.is_owned = (id & 1) || (id == 0);
+       id_conv = OutPoint_clone(&id_conv);
+       LDKChannelMonitor data_conv;
+       data_conv.inner = (void*)(data & (~1));
+       data_conv.is_owned = false;
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, id_conv, &data_conv);
+       return (long)ret_conv;
 }
 
-typedef struct LDKLogger_JCalls {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t id, int64_t update, int64_t data) {
+       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
+       LDKOutPoint id_conv;
+       id_conv.inner = (void*)(id & (~1));
+       id_conv.is_owned = (id & 1) || (id == 0);
+       id_conv = OutPoint_clone(&id_conv);
+       LDKChannelMonitorUpdate update_conv;
+       update_conv.inner = (void*)(update & (~1));
+       update_conv.is_owned = false;
+       LDKChannelMonitor data_conv;
+       data_conv.inner = (void*)(data & (~1));
+       data_conv.is_owned = false;
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, id_conv, &update_conv, &data_conv);
+       return (long)ret_conv;
+}
+
+typedef struct LDKChannelMessageHandler_JCalls {
        atomic_size_t refcnt;
        JavaVM *vm;
        jweak o;
-       jmethodID log_meth;
-} LDKLogger_JCalls;
-static void LDKLogger_JCalls_free(void* this_arg) {
-       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
+       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
+       jmethodID handle_open_channel_meth;
+       jmethodID handle_accept_channel_meth;
+       jmethodID handle_funding_created_meth;
+       jmethodID handle_funding_signed_meth;
+       jmethodID handle_funding_locked_meth;
+       jmethodID handle_shutdown_meth;
+       jmethodID handle_closing_signed_meth;
+       jmethodID handle_update_add_htlc_meth;
+       jmethodID handle_update_fulfill_htlc_meth;
+       jmethodID handle_update_fail_htlc_meth;
+       jmethodID handle_update_fail_malformed_htlc_meth;
+       jmethodID handle_commitment_signed_meth;
+       jmethodID handle_revoke_and_ack_meth;
+       jmethodID handle_update_fee_meth;
+       jmethodID handle_announcement_signatures_meth;
+       jmethodID peer_disconnected_meth;
+       jmethodID peer_connected_meth;
+       jmethodID handle_channel_reestablish_meth;
+       jmethodID handle_error_meth;
+} LDKChannelMessageHandler_JCalls;
+static void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
                JNIEnv *env;
                DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
@@ -2593,3083 +5031,2911 @@ static void LDKLogger_JCalls_free(void* this_arg) {
                FREE(j_calls);
        }
 }
-void log_jcall(const void* this_arg, const char* record) {
-       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
+void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKInitFeatures their_features_var = their_features;
+       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long their_features_ref = (long)their_features_var.inner;
+       if (their_features_var.is_owned) {
+               their_features_ref |= 1;
+       }
+       LDKOpenChannel msg_var = *msg;
+       msg_var = OpenChannel_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_open_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+}
+void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKInitFeatures their_features_var = their_features;
+       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long their_features_ref = (long)their_features_var.inner;
+       if (their_features_var.is_owned) {
+               their_features_ref |= 1;
+       }
+       LDKAcceptChannel msg_var = *msg;
+       msg_var = AcceptChannel_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_accept_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+}
+void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
        JNIEnv *env;
        DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       const char* record_str = record;
-       jstring record_conv = str_ref_to_java(env, record_str, strlen(record_str));
+       int8_tArray their_node_id_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, their_node_id_arr, 0, 33, their_node_id.compressed_form);
+       LDKFundingCreated msg_var = *msg;
+       msg_var = FundingCreated_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
        jobject obj = (*env)->NewLocalRef(env, j_calls->o);
        CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->log_meth, record_conv);
-}
-static void* LDKLogger_JCalls_clone(const void* this_arg) {
-       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
-}
-static inline LDKLogger LDKLogger_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKLogger_JCalls *calls = MALLOC(sizeof(LDKLogger_JCalls), "LDKLogger_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->log_meth = (*env)->GetMethodID(env, c, "log", "(Ljava/lang/String;)V");
-       CHECK(calls->log_meth != NULL);
-
-       LDKLogger ret = {
-               .this_arg = (void*) calls,
-               .log = log_jcall,
-               .free = LDKLogger_JCalls_free,
-       };
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKLogger *res_ptr = MALLOC(sizeof(LDKLogger), "LDKLogger");
-       *res_ptr = LDKLogger_init(env, clz, o);
-       return (long)res_ptr;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
-       LDKC2Tuple_BlockHashChannelManagerZ* ret = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
-       LDKThirtyTwoBytes a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 32);
-       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
-       ret->a = a_ref;
-       LDKChannelManager b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelManager
-       ret->b = b_conv;
-       return (long)ret;
-}
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
-       int8_tArray a_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, a_arr, 0, 32, tuple->a.data);
-       return a_arr;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
-       LDKChannelManager b_var = tuple->b;
-       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long b_ref = (long)b_var.inner & ~1;
-       return b_ref;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       long res_ref = (long)(&(*val->contents.result)) | 1;
-       return res_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NetAddressu8Z*)arg)->result_ok;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NetAddressu8Z *val = (LDKCResult_NetAddressu8Z*)(arg & ~1);
-       CHECK(val->result_ok);
-       long res_ref = ((long)&(*val->contents.result)) | 1;
-       return res_ref;
-}
-JNIEXPORT int8_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NetAddressu8Z *val = (LDKCResult_NetAddressu8Z*)(arg & ~1);
-       CHECK(!val->result_ok);
-       return *val->contents.err;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)arg)->result_ok;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *val = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKCResult_NetAddressu8Z* res_conv = MALLOC(sizeof(LDKCResult_NetAddressu8Z), "LDKCResult_NetAddressu8Z");
-       *res_conv = (*val->contents.result);
-       *res_conv = CResult_NetAddressu8Z_clone(res_conv);
-       return (long)res_conv;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *val = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_created_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1u64Z_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_u64Z *ret = MALLOC(sizeof(LDKCVec_u64Z), "LDKCVec_u64Z");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(uint64_t) * ret->datalen, "LDKCVec_u64Z Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       ret->data[i] = java_elems[i];
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKFundingSigned msg_var = *msg;
+       msg_var = FundingSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return (long)ret;
-}
-static inline LDKCVec_u64Z CVec_u64Z_clone(const LDKCVec_u64Z *orig) {
-       LDKCVec_u64Z ret = { .data = MALLOC(sizeof(int64_t) * orig->datalen, "LDKCVec_u64Z clone bytes"), .datalen = orig->datalen };
-       memcpy(ret.data, orig->data, sizeof(int64_t) * ret.datalen);
-       return ret;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_signed_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateAddHTLCZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_UpdateAddHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateAddHTLCZ), "LDKCVec_UpdateAddHTLCZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKUpdateAddHTLC) * ret->datalen, "LDKCVec_UpdateAddHTLCZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKUpdateAddHTLC arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = UpdateAddHTLC_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKFundingLocked msg_var = *msg;
+       msg_var = FundingLocked_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return (long)ret;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_locked_meth, their_node_id_arr, msg_ref);
 }
-static inline LDKCVec_UpdateAddHTLCZ CVec_UpdateAddHTLCZ_clone(const LDKCVec_UpdateAddHTLCZ *orig) {
-       LDKCVec_UpdateAddHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateAddHTLC) * orig->datalen, "LDKCVec_UpdateAddHTLCZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = UpdateAddHTLC_clone(&orig->data[i]);
+void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInitFeatures * their_features, const LDKShutdown * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKInitFeatures their_features_var = *their_features;
+       their_features_var = InitFeatures_clone(their_features);
+       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long their_features_ref = (long)their_features_var.inner;
+       if (their_features_var.is_owned) {
+               their_features_ref |= 1;
        }
-       return ret;
+       LDKShutdown msg_var = *msg;
+       msg_var = Shutdown_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_shutdown_meth, their_node_id_arr, their_features_ref, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFulfillHTLCZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_UpdateFulfillHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFulfillHTLCZ), "LDKCVec_UpdateFulfillHTLCZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKUpdateFulfillHTLC) * ret->datalen, "LDKCVec_UpdateFulfillHTLCZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKUpdateFulfillHTLC arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = UpdateFulfillHTLC_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKClosingSigned msg_var = *msg;
+       msg_var = ClosingSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return (long)ret;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_closing_signed_meth, their_node_id_arr, msg_ref);
 }
-static inline LDKCVec_UpdateFulfillHTLCZ CVec_UpdateFulfillHTLCZ_clone(const LDKCVec_UpdateFulfillHTLCZ *orig) {
-       LDKCVec_UpdateFulfillHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFulfillHTLC) * orig->datalen, "LDKCVec_UpdateFulfillHTLCZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = UpdateFulfillHTLC_clone(&orig->data[i]);
+void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKUpdateAddHTLC msg_var = *msg;
+       msg_var = UpdateAddHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return ret;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_add_htlc_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailHTLCZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_UpdateFailHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFailHTLCZ), "LDKCVec_UpdateFailHTLCZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKUpdateFailHTLC) * ret->datalen, "LDKCVec_UpdateFailHTLCZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKUpdateFailHTLC arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = UpdateFailHTLC_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKUpdateFulfillHTLC msg_var = *msg;
+       msg_var = UpdateFulfillHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return (long)ret;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fulfill_htlc_meth, their_node_id_arr, msg_ref);
 }
-static inline LDKCVec_UpdateFailHTLCZ CVec_UpdateFailHTLCZ_clone(const LDKCVec_UpdateFailHTLCZ *orig) {
-       LDKCVec_UpdateFailHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFailHTLC) * orig->datalen, "LDKCVec_UpdateFailHTLCZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = UpdateFailHTLC_clone(&orig->data[i]);
+void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKUpdateFailHTLC msg_var = *msg;
+       msg_var = UpdateFailHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return ret;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fail_htlc_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailMalformedHTLCZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_UpdateFailMalformedHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFailMalformedHTLCZ), "LDKCVec_UpdateFailMalformedHTLCZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKUpdateFailMalformedHTLC) * ret->datalen, "LDKCVec_UpdateFailMalformedHTLCZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKUpdateFailMalformedHTLC arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = UpdateFailMalformedHTLC_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKUpdateFailMalformedHTLC msg_var = *msg;
+       msg_var = UpdateFailMalformedHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return (long)ret;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fail_malformed_htlc_meth, their_node_id_arr, msg_ref);
 }
-static inline LDKCVec_UpdateFailMalformedHTLCZ CVec_UpdateFailMalformedHTLCZ_clone(const LDKCVec_UpdateFailMalformedHTLCZ *orig) {
-       LDKCVec_UpdateFailMalformedHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFailMalformedHTLC) * orig->datalen, "LDKCVec_UpdateFailMalformedHTLCZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = UpdateFailMalformedHTLC_clone(&orig->data[i]);
+void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKCommitmentSigned msg_var = *msg;
+       msg_var = CommitmentSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return ret;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_boolLightningErrorZ*)arg)->result_ok;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_t c) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-       LDKChannelAnnouncement a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = ChannelAnnouncement_clone(&a_conv);
-       ret->a = a_conv;
-       LDKChannelUpdate b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelUpdate_clone(&b_conv);
-       ret->b = b_conv;
-       LDKChannelUpdate c_conv;
-       c_conv.inner = (void*)(c & (~1));
-       c_conv.is_owned = (c & 1) || (c == 0);
-       c_conv = ChannelUpdate_clone(&c_conv);
-       ret->c = c_conv;
-       return (long)ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelAnnouncement a_var = tuple->a;
-       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long a_ref = (long)a_var.inner & ~1;
-       return a_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelUpdate b_var = tuple->b;
-       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long b_ref = (long)b_var.inner & ~1;
-       return b_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c(JNIEnv *env, jclass clz, int64_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelUpdate c_var = tuple->c;
-       CHECK((((long)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long c_ref = (long)c_var.inner & ~1;
-       return c_ref;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_commitment_signed_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * ret->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_elem_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKRevokeAndACK msg_var = *msg;
+       msg_var = RevokeAndACK_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return (long)ret;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_revoke_and_ack_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NodeAnnouncementZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_NodeAnnouncementZ *ret = MALLOC(sizeof(LDKCVec_NodeAnnouncementZ), "LDKCVec_NodeAnnouncementZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKNodeAnnouncement) * ret->datalen, "LDKCVec_NodeAnnouncementZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKNodeAnnouncement arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = NodeAnnouncement_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
+void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKUpdateFee msg_var = *msg;
+       msg_var = UpdateFee_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return (long)ret;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fee_meth, their_node_id_arr, msg_ref);
 }
-static inline LDKCVec_NodeAnnouncementZ CVec_NodeAnnouncementZ_clone(const LDKCVec_NodeAnnouncementZ *orig) {
-       LDKCVec_NodeAnnouncementZ ret = { .data = MALLOC(sizeof(LDKNodeAnnouncement) * orig->datalen, "LDKCVec_NodeAnnouncementZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = NodeAnnouncement_clone(&orig->data[i]);
+void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKAnnouncementSignatures msg_var = *msg;
+       msg_var = AnnouncementSignatures_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
        }
-       return ret;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NoneLightningErrorZ*)arg)->result_ok;
-}
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ChannelReestablishDecodeErrorZ*)arg)->result_ok;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKChannelReestablish res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_announcement_signatures_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_InitDecodeErrorZ*)arg)->result_ok;
+void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->peer_disconnected_meth, their_node_id_arr, no_connection_possible);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKInit res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKInit msg_var = *msg;
+       msg_var = Init_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKChannelReestablish msg_var = *msg;
+       msg_var = ChannelReestablish_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_channel_reestablish_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_PingDecodeErrorZ*)arg)->result_ok;
+void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKErrorMessage msg_var = *msg;
+       msg_var = ErrorMessage_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_error_meth, their_node_id_arr, msg_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKPing res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+static void* LDKChannelMessageHandler_JCalls_clone(const void* this_arg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKChannelMessageHandler_JCalls *calls = MALLOC(sizeof(LDKChannelMessageHandler_JCalls), "LDKChannelMessageHandler_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->handle_open_channel_meth = (*env)->GetMethodID(env, c, "handle_open_channel", "([BJJ)V");
+       CHECK(calls->handle_open_channel_meth != NULL);
+       calls->handle_accept_channel_meth = (*env)->GetMethodID(env, c, "handle_accept_channel", "([BJJ)V");
+       CHECK(calls->handle_accept_channel_meth != NULL);
+       calls->handle_funding_created_meth = (*env)->GetMethodID(env, c, "handle_funding_created", "([BJ)V");
+       CHECK(calls->handle_funding_created_meth != NULL);
+       calls->handle_funding_signed_meth = (*env)->GetMethodID(env, c, "handle_funding_signed", "([BJ)V");
+       CHECK(calls->handle_funding_signed_meth != NULL);
+       calls->handle_funding_locked_meth = (*env)->GetMethodID(env, c, "handle_funding_locked", "([BJ)V");
+       CHECK(calls->handle_funding_locked_meth != NULL);
+       calls->handle_shutdown_meth = (*env)->GetMethodID(env, c, "handle_shutdown", "([BJJ)V");
+       CHECK(calls->handle_shutdown_meth != NULL);
+       calls->handle_closing_signed_meth = (*env)->GetMethodID(env, c, "handle_closing_signed", "([BJ)V");
+       CHECK(calls->handle_closing_signed_meth != NULL);
+       calls->handle_update_add_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_add_htlc", "([BJ)V");
+       CHECK(calls->handle_update_add_htlc_meth != NULL);
+       calls->handle_update_fulfill_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fulfill_htlc", "([BJ)V");
+       CHECK(calls->handle_update_fulfill_htlc_meth != NULL);
+       calls->handle_update_fail_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_htlc", "([BJ)V");
+       CHECK(calls->handle_update_fail_htlc_meth != NULL);
+       calls->handle_update_fail_malformed_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_malformed_htlc", "([BJ)V");
+       CHECK(calls->handle_update_fail_malformed_htlc_meth != NULL);
+       calls->handle_commitment_signed_meth = (*env)->GetMethodID(env, c, "handle_commitment_signed", "([BJ)V");
+       CHECK(calls->handle_commitment_signed_meth != NULL);
+       calls->handle_revoke_and_ack_meth = (*env)->GetMethodID(env, c, "handle_revoke_and_ack", "([BJ)V");
+       CHECK(calls->handle_revoke_and_ack_meth != NULL);
+       calls->handle_update_fee_meth = (*env)->GetMethodID(env, c, "handle_update_fee", "([BJ)V");
+       CHECK(calls->handle_update_fee_meth != NULL);
+       calls->handle_announcement_signatures_meth = (*env)->GetMethodID(env, c, "handle_announcement_signatures", "([BJ)V");
+       CHECK(calls->handle_announcement_signatures_meth != NULL);
+       calls->peer_disconnected_meth = (*env)->GetMethodID(env, c, "peer_disconnected", "([BZ)V");
+       CHECK(calls->peer_disconnected_meth != NULL);
+       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)V");
+       CHECK(calls->peer_connected_meth != NULL);
+       calls->handle_channel_reestablish_meth = (*env)->GetMethodID(env, c, "handle_channel_reestablish", "([BJ)V");
+       CHECK(calls->handle_channel_reestablish_meth != NULL);
+       calls->handle_error_meth = (*env)->GetMethodID(env, c, "handle_error", "([BJ)V");
+       CHECK(calls->handle_error_meth != NULL);
+
+       LDKChannelMessageHandler ret = {
+               .this_arg = (void*) calls,
+               .handle_open_channel = handle_open_channel_jcall,
+               .handle_accept_channel = handle_accept_channel_jcall,
+               .handle_funding_created = handle_funding_created_jcall,
+               .handle_funding_signed = handle_funding_signed_jcall,
+               .handle_funding_locked = handle_funding_locked_jcall,
+               .handle_shutdown = handle_shutdown_jcall,
+               .handle_closing_signed = handle_closing_signed_jcall,
+               .handle_update_add_htlc = handle_update_add_htlc_jcall,
+               .handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall,
+               .handle_update_fail_htlc = handle_update_fail_htlc_jcall,
+               .handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall,
+               .handle_commitment_signed = handle_commitment_signed_jcall,
+               .handle_revoke_and_ack = handle_revoke_and_ack_jcall,
+               .handle_update_fee = handle_update_fee_jcall,
+               .handle_announcement_signatures = handle_announcement_signatures_jcall,
+               .peer_disconnected = peer_disconnected_jcall,
+               .peer_connected = peer_connected_jcall,
+               .handle_channel_reestablish = handle_channel_reestablish_jcall,
+               .handle_error = handle_error_jcall,
+               .free = LDKChannelMessageHandler_JCalls_free,
+               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(env, clz, MessageSendEventsProvider),
+       };
+       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
+       return ret;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_PongDecodeErrorZ*)arg)->result_ok;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new(JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
+       LDKChannelMessageHandler *res_ptr = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
+       *res_ptr = LDKChannelMessageHandler_init(env, clz, o, MessageSendEventsProvider);
+       return (long)res_ptr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKPong res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1open_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t their_features, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKInitFeatures their_features_conv;
+       their_features_conv.inner = (void*)(their_features & (~1));
+       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
+       their_features_conv = InitFeatures_clone(&their_features_conv);
+       LDKOpenChannel msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_open_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1accept_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t their_features, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKInitFeatures their_features_conv;
+       their_features_conv.inner = (void*)(their_features & (~1));
+       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
+       their_features_conv = InitFeatures_clone(&their_features_conv);
+       LDKAcceptChannel msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_accept_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1created(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKFundingCreated msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_created)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKUnsignedChannelAnnouncement res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKFundingSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1locked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKFundingLocked msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1shutdown(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t their_features, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKInitFeatures their_features_conv;
+       their_features_conv.inner = (void*)(their_features & (~1));
+       their_features_conv.is_owned = false;
+       LDKShutdown msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_shutdown)(this_arg_conv->this_arg, their_node_id_ref, &their_features_conv, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKUnsignedChannelUpdate res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1closing_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKClosingSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_closing_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1add_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKUpdateAddHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_add_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ErrorMessageDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fulfill_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKUpdateFulfillHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fulfill_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKErrorMessage res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKUpdateFailHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fail_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1malformed_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKUpdateFailMalformedHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fail_malformed_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1commitment_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKCommitmentSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_commitment_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKUnsignedNodeAnnouncement res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1revoke_1and_1ack(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKRevokeAndACK msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_revoke_and_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fee(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKUpdateFee msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fee)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_QueryShortChannelIdsDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1announcement_1signatures(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKAnnouncementSignatures msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_announcement_signatures)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKQueryShortChannelIds res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1disconnected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKInit msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1channel_1reestablish(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKChannelReestablish msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_channel_reestablish)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKReplyShortChannelIdsEnd res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1error(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       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);
+       LDKErrorMessage msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_error)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+typedef struct LDKRoutingMessageHandler_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
+       jmethodID handle_node_announcement_meth;
+       jmethodID handle_channel_announcement_meth;
+       jmethodID handle_channel_update_meth;
+       jmethodID handle_htlc_fail_channel_update_meth;
+       jmethodID get_next_channel_announcements_meth;
+       jmethodID get_next_node_announcements_meth;
+       jmethodID sync_routing_table_meth;
+       jmethodID handle_reply_channel_range_meth;
+       jmethodID handle_reply_short_channel_ids_end_meth;
+       jmethodID handle_query_channel_range_meth;
+       jmethodID handle_query_short_channel_ids_meth;
+} LDKRoutingMessageHandler_JCalls;
+static void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_QueryChannelRangeDecodeErrorZ*)arg)->result_ok;
+LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKNodeAnnouncement msg_var = *msg;
+       msg_var = NodeAnnouncement_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_node_announcement_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKQueryChannelRange res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKChannelAnnouncement msg_var = *msg;
+       msg_var = ChannelAnnouncement_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_channel_announcement_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKChannelUpdate msg_var = *msg;
+       msg_var = ChannelUpdate_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_channel_update_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_ReplyChannelRangeDecodeErrorZ*)arg)->result_ok;
+void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate * update) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       long ret_update = (long)update;
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->handle_htlc_fail_channel_update_meth, ret_update);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKReplyChannelRange res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int64_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->get_next_channel_announcements_meth, starting_point, batch_amount);
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_constr;
+       ret_constr.datalen = (*env)->GetArrayLength(env, ret);
+       if (ret_constr.datalen > 0)
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
+       else
+               ret_constr.data = NULL;
+       int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
+       for (size_t l = 0; l < ret_constr.datalen; l++) {
+               int64_t ret_conv_63 = ret_vals[l];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1);
+               ret_conv_63_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)ret_conv_63);
+               ret_constr.data[l] = ret_conv_63_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
+       return ret_constr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       int8_tArray starting_point_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, starting_point_arr, 0, 33, starting_point.compressed_form);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       int64_tArray ret = (*env)->CallObjectMethod(env, obj, j_calls->get_next_node_announcements_meth, starting_point_arr, batch_amount);
+       LDKCVec_NodeAnnouncementZ ret_constr;
+       ret_constr.datalen = (*env)->GetArrayLength(env, ret);
+       if (ret_constr.datalen > 0)
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
+       else
+               ret_constr.data = NULL;
+       int64_t* ret_vals = (*env)->GetLongArrayElements (env, ret, NULL);
+       for (size_t s = 0; s < ret_constr.datalen; s++) {
+               int64_t ret_conv_18 = ret_vals[s];
+               LDKNodeAnnouncement ret_conv_18_conv;
+               ret_conv_18_conv.inner = (void*)(ret_conv_18 & (~1));
+               ret_conv_18_conv.is_owned = (ret_conv_18 & 1) || (ret_conv_18 == 0);
+               ret_conv_18_conv = NodeAnnouncement_clone(&ret_conv_18_conv);
+               ret_constr.data[s] = ret_conv_18_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, ret, ret_vals, 0);
+       return ret_constr;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_GossipTimestampFilterDecodeErrorZ*)arg)->result_ok;
+void sync_routing_table_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKInit init_var = *init;
+       init_var = Init_clone(init);
+       CHECK((((long)init_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&init_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long init_ref = (long)init_var.inner;
+       if (init_var.is_owned) {
+               init_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->sync_routing_table_meth, their_node_id_arr, init_ref);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKGossipTimestampFilter res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+LDKCResult_NoneLightningErrorZ handle_reply_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKReplyChannelRange msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_reply_channel_range_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyShortChannelIdsEnd msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKReplyShortChannelIdsEnd msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_reply_short_channel_ids_end_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg)->result_ok;
+LDKCResult_NoneLightningErrorZ handle_query_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryChannelRange msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKQueryChannelRange msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_query_channel_range_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKCVec_u8Z res_var = (*val->contents.result);
-       int8_tArray res_arr = (*env)->NewByteArray(env, res_var.datalen);
-       (*env)->SetByteArrayRegion(env, res_arr, 0, res_var.datalen, res_var.data);
-       return res_arr;
+LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryShortChannelIds msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
+       LDKQueryShortChannelIds msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_query_short_channel_ids_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+static void* LDKRoutingMessageHandler_JCalls_clone(const void* this_arg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NonePeerHandleErrorZ*)arg)->result_ok;
+static inline LDKRoutingMessageHandler LDKRoutingMessageHandler_init (JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKRoutingMessageHandler_JCalls *calls = MALLOC(sizeof(LDKRoutingMessageHandler_JCalls), "LDKRoutingMessageHandler_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->handle_node_announcement_meth = (*env)->GetMethodID(env, c, "handle_node_announcement", "(J)J");
+       CHECK(calls->handle_node_announcement_meth != NULL);
+       calls->handle_channel_announcement_meth = (*env)->GetMethodID(env, c, "handle_channel_announcement", "(J)J");
+       CHECK(calls->handle_channel_announcement_meth != NULL);
+       calls->handle_channel_update_meth = (*env)->GetMethodID(env, c, "handle_channel_update", "(J)J");
+       CHECK(calls->handle_channel_update_meth != NULL);
+       calls->handle_htlc_fail_channel_update_meth = (*env)->GetMethodID(env, c, "handle_htlc_fail_channel_update", "(J)V");
+       CHECK(calls->handle_htlc_fail_channel_update_meth != NULL);
+       calls->get_next_channel_announcements_meth = (*env)->GetMethodID(env, c, "get_next_channel_announcements", "(JB)[J");
+       CHECK(calls->get_next_channel_announcements_meth != NULL);
+       calls->get_next_node_announcements_meth = (*env)->GetMethodID(env, c, "get_next_node_announcements", "([BB)[J");
+       CHECK(calls->get_next_node_announcements_meth != NULL);
+       calls->sync_routing_table_meth = (*env)->GetMethodID(env, c, "sync_routing_table", "([BJ)V");
+       CHECK(calls->sync_routing_table_meth != NULL);
+       calls->handle_reply_channel_range_meth = (*env)->GetMethodID(env, c, "handle_reply_channel_range", "([BJ)J");
+       CHECK(calls->handle_reply_channel_range_meth != NULL);
+       calls->handle_reply_short_channel_ids_end_meth = (*env)->GetMethodID(env, c, "handle_reply_short_channel_ids_end", "([BJ)J");
+       CHECK(calls->handle_reply_short_channel_ids_end_meth != NULL);
+       calls->handle_query_channel_range_meth = (*env)->GetMethodID(env, c, "handle_query_channel_range", "([BJ)J");
+       CHECK(calls->handle_query_channel_range_meth != NULL);
+       calls->handle_query_short_channel_ids_meth = (*env)->GetMethodID(env, c, "handle_query_short_channel_ids", "([BJ)J");
+       CHECK(calls->handle_query_short_channel_ids_meth != NULL);
+
+       LDKRoutingMessageHandler ret = {
+               .this_arg = (void*) calls,
+               .handle_node_announcement = handle_node_announcement_jcall,
+               .handle_channel_announcement = handle_channel_announcement_jcall,
+               .handle_channel_update = handle_channel_update_jcall,
+               .handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall,
+               .get_next_channel_announcements = get_next_channel_announcements_jcall,
+               .get_next_node_announcements = get_next_node_announcements_jcall,
+               .sync_routing_table = sync_routing_table_jcall,
+               .handle_reply_channel_range = handle_reply_channel_range_jcall,
+               .handle_reply_short_channel_ids_end = handle_reply_short_channel_ids_end_jcall,
+               .handle_query_channel_range = handle_query_channel_range_jcall,
+               .handle_query_short_channel_ids = handle_query_short_channel_ids_jcall,
+               .free = LDKRoutingMessageHandler_JCalls_free,
+               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(env, clz, MessageSendEventsProvider),
+       };
+       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
+       return ret;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new(JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
+       LDKRoutingMessageHandler *res_ptr = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
+       *res_ptr = LDKRoutingMessageHandler_init(env, clz, o, MessageSendEventsProvider);
+       return (long)res_ptr;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1node_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKNodeAnnouncement msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_boolPeerHandleErrorZ*)arg)->result_ok;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKChannelAnnouncement msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1update(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKChannelUpdate msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1htlc_1fail_1channel_1update(JNIEnv *env, jclass clz, int64_t this_arg, int64_t update) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKHTLCFailChannelUpdate* update_conv = (LDKHTLCFailChannelUpdate*)update;
+       (this_arg_conv->handle_htlc_fail_channel_update)(this_arg_conv->this_arg, update_conv);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_SecretKeySecpErrorZ*)arg)->result_ok;
+
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1channel_1announcements(JNIEnv *env, jclass clz, int64_t this_arg, int64_t starting_point, int8_t batch_amount) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t l = 0; l < ret_var.datalen; l++) {
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+               *ret_conv_63_ref = ret_var.data[l];
+               ret_arr_ptr[l] = (long)ret_conv_63_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SecretKeySecpErrorZ *val = (LDKCResult_SecretKeySecpErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       int8_tArray res_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, res_arr, 0, 32, (*val->contents.result).bytes);
-       return res_arr;
+
+JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1node_1announcements(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray starting_point, int8_t batch_amount) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey starting_point_ref;
+       CHECK((*env)->GetArrayLength(env, starting_point) == 33);
+       (*env)->GetByteArrayRegion(env, starting_point, 0, 33, starting_point_ref.compressed_form);
+       LDKCVec_NodeAnnouncementZ ret_var = (this_arg_conv->get_next_node_announcements)(this_arg_conv->this_arg, starting_point_ref, batch_amount);
+       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
+       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
+       for (size_t s = 0; s < ret_var.datalen; s++) {
+               LDKNodeAnnouncement ret_conv_18_var = ret_var.data[s];
+               CHECK((((long)ret_conv_18_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+               CHECK((((long)&ret_conv_18_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+               long ret_conv_18_ref = (long)ret_conv_18_var.inner;
+               if (ret_conv_18_var.is_owned) {
+                       ret_conv_18_ref |= 1;
+               }
+               ret_arr_ptr[s] = ret_conv_18_ref;
+       }
+       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
+       FREE(ret_var.data);
+       return ret_arr;
 }
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_SecretKeySecpErrorZ *val = (LDKCResult_SecretKeySecpErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
-       return err_conv;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1sync_1routing_1table(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       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);
+       LDKInit init_conv;
+       init_conv.inner = (void*)(init & (~1));
+       init_conv.is_owned = false;
+       (this_arg_conv->sync_routing_table)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1channel_1range(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       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);
+       LDKReplyChannelRange msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = ReplyChannelRange_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_reply_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_PublicKeySecpErrorZ*)arg)->result_ok;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1short_1channel_1ids_1end(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       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);
+       LDKReplyShortChannelIdsEnd msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = ReplyShortChannelIdsEnd_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_reply_short_channel_ids_end)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PublicKeySecpErrorZ *val = (LDKCResult_PublicKeySecpErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       int8_tArray res_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, res_arr, 0, 33, (*val->contents.result).compressed_form);
-       return res_arr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1channel_1range(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       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);
+       LDKQueryChannelRange msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = QueryChannelRange_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_query_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_PublicKeySecpErrorZ *val = (LDKCResult_PublicKeySecpErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
-       return err_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       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);
+       LDKQueryShortChannelIds msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = QueryShortChannelIds_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_query_short_channel_ids)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_TxCreationKeysSecpErrorZ*)arg)->result_ok;
+
+typedef struct LDKSocketDescriptor_JCalls {
+       atomic_size_t refcnt;
+       JavaVM *vm;
+       jweak o;
+       jmethodID send_data_meth;
+       jmethodID disconnect_socket_meth;
+       jmethodID eq_meth;
+       jmethodID hash_meth;
+} LDKSocketDescriptor_JCalls;
+static void LDKSocketDescriptor_JCalls_free(void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               JNIEnv *env;
+               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
+               FREE(j_calls);
+       }
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TxCreationKeysSecpErrorZ *val = (LDKCResult_TxCreationKeysSecpErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKTxCreationKeys res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKu8slice data_var = data;
+       int8_tArray data_arr = (*env)->NewByteArray(env, data_var.datalen);
+       (*env)->SetByteArrayRegion(env, data_arr, 0, data_var.datalen, data_var.data);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallLongMethod(env, obj, j_calls->send_data_meth, data_arr, resume_read);
 }
-JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TxCreationKeysSecpErrorZ *val = (LDKCResult_TxCreationKeysSecpErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       jclass err_conv = LDKSecp256k1Error_to_java(env, (*val->contents.err));
-       return err_conv;
+void disconnect_socket_jcall(void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallVoidMethod(env, obj, j_calls->disconnect_socket_meth);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_TrustedCommitmentTransactionNoneZ*)arg)->result_ok;
+bool eq_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
+       *other_arg_clone = SocketDescriptor_clone(other_arg);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallBooleanMethod(env, obj, j_calls->eq_meth, (long)other_arg_clone);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKTrustedCommitmentTransaction res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+uint64_t hash_jcall(const void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       JNIEnv *env;
+       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
+       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
+       CHECK(obj != NULL);
+       return (*env)->CallLongMethod(env, obj, j_calls->hash_meth);
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       return *val->contents.err;
+static void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_CVec_SignatureZNoneZ*)arg)->result_ok;
+static inline LDKSocketDescriptor LDKSocketDescriptor_init (JNIEnv *env, jclass clz, jobject o) {
+       jclass c = (*env)->GetObjectClass(env, o);
+       CHECK(c != NULL);
+       LDKSocketDescriptor_JCalls *calls = MALLOC(sizeof(LDKSocketDescriptor_JCalls), "LDKSocketDescriptor_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
+       calls->o = (*env)->NewWeakGlobalRef(env, o);
+       calls->send_data_meth = (*env)->GetMethodID(env, c, "send_data", "([BZ)J");
+       CHECK(calls->send_data_meth != NULL);
+       calls->disconnect_socket_meth = (*env)->GetMethodID(env, c, "disconnect_socket", "()V");
+       CHECK(calls->disconnect_socket_meth != NULL);
+       calls->eq_meth = (*env)->GetMethodID(env, c, "eq", "(J)Z");
+       CHECK(calls->eq_meth != NULL);
+       calls->hash_meth = (*env)->GetMethodID(env, c, "hash", "()J");
+       CHECK(calls->hash_meth != NULL);
+
+       LDKSocketDescriptor ret = {
+               .this_arg = (void*) calls,
+               .send_data = send_data_jcall,
+               .disconnect_socket = disconnect_socket_jcall,
+               .eq = eq_jcall,
+               .hash = hash_jcall,
+               .clone = LDKSocketDescriptor_JCalls_clone,
+               .free = LDKSocketDescriptor_JCalls_free,
+       };
+       return ret;
 }
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKCVec_SignatureZ res_var = (*val->contents.result);
-       jobjectArray res_arr = (*env)->NewObjectArray(env, res_var.datalen, arr_of_B_clz, NULL);
-       ;
-       for (size_t i = 0; i < res_var.datalen; i++) {
-               int8_tArray arr_conv_8_arr = (*env)->NewByteArray(env, 64);
-               (*env)->SetByteArrayRegion(env, arr_conv_8_arr, 0, 64, res_var.data[i].compact_form);
-               (*env)->SetObjectArrayElement(env, res_arr, i, arr_conv_8_arr);
-       }
-       return res_arr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new(JNIEnv *env, jclass clz, jobject o) {
+       LDKSocketDescriptor *res_ptr = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
+       *res_ptr = LDKSocketDescriptor_init(env, clz, o);
+       return (long)res_ptr;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       return *val->contents.err;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1send_1data(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray data, jboolean resume_read) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       LDKu8slice data_ref;
+       data_ref.datalen = (*env)->GetArrayLength(env, data);
+       data_ref.data = (*env)->GetByteArrayElements (env, data, NULL);
+       int64_t ret_val = (this_arg_conv->send_data)(this_arg_conv->this_arg, data_ref, resume_read);
+       (*env)->ReleaseByteArrayElements(env, data, (int8_t*)data_ref.data, 0);
+       return ret_val;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHopZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_RouteHopZ *ret = MALLOC(sizeof(LDKCVec_RouteHopZ), "LDKCVec_RouteHopZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKRouteHop) * ret->datalen, "LDKCVec_RouteHopZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKRouteHop arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = RouteHop_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1disconnect_1socket(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       (this_arg_conv->disconnect_socket)(this_arg_conv->this_arg);
 }
-static inline LDKCVec_RouteHopZ CVec_RouteHopZ_clone(const LDKCVec_RouteHopZ *orig) {
-       LDKCVec_RouteHopZ ret = { .data = MALLOC(sizeof(LDKRouteHop) * orig->datalen, "LDKCVec_RouteHopZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = RouteHop_clone(&orig->data[i]);
-       }
-       return ret;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       int64_t ret_val = (this_arg_conv->hash)(this_arg_conv->this_arg);
+       return ret_val;
 }
-static inline LDKCVec_CVec_RouteHopZZ CVec_CVec_RouteHopZZ_clone(const LDKCVec_CVec_RouteHopZZ *orig) {
-       LDKCVec_CVec_RouteHopZZ ret = { .data = MALLOC(sizeof(LDKCVec_RouteHopZ) * orig->datalen, "LDKCVec_CVec_RouteHopZZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = CVec_RouteHopZ_clone(&orig->data[i]);
-       }
-       return ret;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Transaction_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
+       LDKTransaction _res_ref;
+       _res_ref.datalen = (*env)->GetArrayLength(env, _res);
+       _res_ref.data = MALLOC(_res_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
+       _res_ref.data_is_owned = true;
+       Transaction_free(_res_ref);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_RouteDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKTxOut _res_conv = *(LDKTxOut*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       TxOut_free(_res_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKRoute res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxOut_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKTxOut* orig_conv = (LDKTxOut*)(orig & ~1);
+       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+       *ret_ref = TxOut_clone(orig_conv);
+       return (long)ret_ref;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKSecretKey o_ref;
+       CHECK((*env)->GetArrayLength(env, o) == 32);
+       (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.bytes);
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
+       *ret_conv = CResult_SecretKeyErrorZ_ok(o_ref);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHintZ_1new(JNIEnv *env, jclass clz, int64_tArray elems) {
-       LDKCVec_RouteHintZ *ret = MALLOC(sizeof(LDKCVec_RouteHintZ), "LDKCVec_RouteHintZ");
-       ret->datalen = (*env)->GetArrayLength(env, elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKRouteHint) * ret->datalen, "LDKCVec_RouteHintZ Data");
-               int64_t *java_elems = (*env)->GetPrimitiveArrayCritical(env, elems, NULL);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       int64_t arr_elem = java_elems[i];
-                       LDKRouteHint arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = RouteHint_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
-               (*env)->ReleasePrimitiveArrayCritical(env, elems, java_elems, 0);
-       }
-       return (long)ret;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
+       *ret_conv = CResult_SecretKeyErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-static inline LDKCVec_RouteHintZ CVec_RouteHintZ_clone(const LDKCVec_RouteHintZ *orig) {
-       LDKCVec_RouteHintZ ret = { .data = MALLOC(sizeof(LDKRouteHint) * orig->datalen, "LDKCVec_RouteHintZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = RouteHint_clone(&orig->data[i]);
-       }
-       return ret;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_SecretKeyErrorZ _res_conv = *(LDKCResult_SecretKeyErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_SecretKeyErrorZ_free(_res_conv);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_RouteLightningErrorZ*)arg)->result_ok;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_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_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
+       *ret_conv = CResult_PublicKeyErrorZ_ok(o_ref);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKRoute res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
+       *ret_conv = CResult_PublicKeyErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_PublicKeyErrorZ _res_conv = *(LDKCResult_PublicKeyErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_PublicKeyErrorZ_free(_res_conv);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_RoutingFeesDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTxCreationKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = TxCreationKeys_clone(&o_conv);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKRoutingFees res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxCreationKeysDecodeErrorZ _res_conv = *(LDKCResult_TxCreationKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxCreationKeysDecodeErrorZ_free(_res_conv);
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_TxCreationKeysDecodeErrorZ* orig_conv = (LDKCResult_TxCreationKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKNodeAnnouncementInfo res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelPublicKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelPublicKeys_clone(&o_conv);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NodeInfoDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelPublicKeysDecodeErrorZ _res_conv = *(LDKCResult_ChannelPublicKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelPublicKeysDecodeErrorZ_free(_res_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKNodeInfo res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* orig_conv = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTxCreationKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = TxCreationKeys_clone(&o_conv);
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
+       *ret_conv = CResult_TxCreationKeysErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1result_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       return ((LDKCResult_NetworkGraphDecodeErrorZ*)arg)->result_ok;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
+       *ret_conv = CResult_TxCreationKeysErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1ok(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKNetworkGraph res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxCreationKeysErrorZ _res_conv = *(LDKCResult_TxCreationKeysErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxCreationKeysErrorZ_free(_res_conv);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1err(JNIEnv *env, jclass clz, int64_t arg) {
-       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKHTLCOutputInCommitment o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = HTLCOutputInCommitment_clone(&o_conv);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-typedef struct LDKMessageSendEventsProvider_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID get_and_clear_pending_msg_events_meth;
-} LDKMessageSendEventsProvider_JCalls;
-static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
-       }
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_and_clear_pending_msg_events_meth);
-       LDKCVec_MessageSendEventZ arg_constr;
-       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
-       else
-               arg_constr.data = NULL;
-       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
-       for (size_t s = 0; s < arg_constr.datalen; s++) {
-               int64_t arr_conv_18 = arg_vals[s];
-               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
-               FREE((void*)arr_conv_18);
-               arg_constr.data[s] = arr_conv_18_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
-       return arg_constr;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res_conv = *(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res_conv);
 }
-static void* LDKMessageSendEventsProvider_JCalls_clone(const void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* orig_conv = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-static inline LDKMessageSendEventsProvider LDKMessageSendEventsProvider_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKMessageSendEventsProvider_JCalls *calls = MALLOC(sizeof(LDKMessageSendEventsProvider_JCalls), "LDKMessageSendEventsProvider_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->get_and_clear_pending_msg_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_msg_events", "()[J");
-       CHECK(calls->get_and_clear_pending_msg_events_meth != NULL);
 
-       LDKMessageSendEventsProvider ret = {
-               .this_arg = (void*) calls,
-               .get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall,
-               .free = LDKMessageSendEventsProvider_JCalls_free,
-       };
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCounterpartyChannelTransactionParameters o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = CounterpartyChannelTransactionParameters_clone(&o_conv);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKMessageSendEventsProvider *res_ptr = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
-       *res_ptr = LDKMessageSendEventsProvider_init(env, clz, o);
-       return (long)res_ptr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1get_1and_1clear_1pending_1msg_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKMessageSendEventsProvider* this_arg_conv = (LDKMessageSendEventsProvider*)this_arg;
-       LDKCVec_MessageSendEventZ ret_var = (this_arg_conv->get_and_clear_pending_msg_events)(this_arg_conv->this_arg);
-       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
-       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t s = 0; s < ret_var.datalen; s++) {
-               LDKMessageSendEvent *arr_conv_18_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
-               *arr_conv_18_copy = MessageSendEvent_clone(&ret_var.data[s]);
-               long arr_conv_18_ref = (long)arr_conv_18_copy;
-               ret_arr_ptr[s] = arr_conv_18_ref;
-       }
-       (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
-       FREE(ret_var.data);
-       return ret_arr;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res_conv = *(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* orig_conv = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelTransactionParameters o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelTransactionParameters_clone(&o_conv);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ _res_conv = *(LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelTransactionParametersDecodeErrorZ_free(_res_conv);
 }
 
-typedef struct LDKEventsProvider_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID get_and_clear_pending_events_meth;
-} LDKEventsProvider_JCalls;
-static void LDKEventsProvider_JCalls_free(void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
-       }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* orig_conv = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_and_clear_pending_events_meth);
-       LDKCVec_EventZ arg_constr;
-       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+       LDKCVec_SignatureZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
        else
-               arg_constr.data = NULL;
-       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
-       for (size_t h = 0; h < arg_constr.datalen; h++) {
-               int64_t arr_conv_7 = arg_vals[h];
-               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
-               FREE((void*)arr_conv_7);
-               arg_constr.data[h] = arr_conv_7_conv;
+               _res_constr.data = NULL;
+       for (size_t i = 0; i < _res_constr.datalen; i++) {
+               int8_tArray _res_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
+               LDKSignature _res_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, _res_conv_8) == 64);
+               (*env)->GetByteArrayRegion(env, _res_conv_8, 0, 64, _res_conv_8_ref.compact_form);
+               _res_constr.data[i] = _res_conv_8_ref;
        }
-       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
-       return arg_constr;
+       CVec_SignatureZ_free(_res_constr);
 }
-static void* LDKEventsProvider_JCalls_clone(const void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKHolderCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = HolderCommitmentTransaction_clone(&o_conv);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-static inline LDKEventsProvider LDKEventsProvider_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKEventsProvider_JCalls *calls = MALLOC(sizeof(LDKEventsProvider_JCalls), "LDKEventsProvider_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->get_and_clear_pending_events_meth = (*env)->GetMethodID(env, c, "get_and_clear_pending_events", "()[J");
-       CHECK(calls->get_and_clear_pending_events_meth != NULL);
 
-       LDKEventsProvider ret = {
-               .this_arg = (void*) calls,
-               .get_and_clear_pending_events = get_and_clear_pending_events_jcall,
-               .free = LDKEventsProvider_JCalls_free,
-       };
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKEventsProvider *res_ptr = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
-       *res_ptr = LDKEventsProvider_init(env, clz, o);
-       return (long)res_ptr;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res_conv);
 }
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_EventsProvider_1get_1and_1clear_1pending_1events(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKEventsProvider* this_arg_conv = (LDKEventsProvider*)this_arg;
-       LDKCVec_EventZ ret_var = (this_arg_conv->get_and_clear_pending_events)(this_arg_conv->this_arg);
-       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
-       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t h = 0; h < ret_var.datalen; h++) {
-               LDKEvent *arr_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-               *arr_conv_7_copy = Event_clone(&ret_var.data[h]);
-               long arr_conv_7_ref = (long)arr_conv_7_copy;
-               ret_arr_ptr[h] = arr_conv_7_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_CResult_1HolderCommitmentTransactionDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-typedef struct LDKAccess_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID get_utxo_meth;
-} LDKAccess_JCalls;
-static void LDKAccess_JCalls_free(void* this_arg) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
-       }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKBuiltCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = BuiltCommitmentTransaction_clone(&o_conv);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-LDKCResult_TxOutAccessErrorZ get_utxo_jcall(const void* this_arg, const uint8_t (* genesis_hash)[32], uint64_t short_channel_id) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray genesis_hash_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, genesis_hash_arr, 0, 32, *genesis_hash);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_TxOutAccessErrorZ* ret = (LDKCResult_TxOutAccessErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->get_utxo_meth, genesis_hash_arr, short_channel_id);
-       LDKCResult_TxOutAccessErrorZ ret_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_TxOutAccessErrorZ_clone((LDKCResult_TxOutAccessErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-static void* LDKAccess_JCalls_clone(const void* this_arg) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res_conv);
 }
-static inline LDKAccess LDKAccess_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKAccess_JCalls *calls = MALLOC(sizeof(LDKAccess_JCalls), "LDKAccess_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->get_utxo_meth = (*env)->GetMethodID(env, c, "get_utxo", "([BJ)J");
-       CHECK(calls->get_utxo_meth != NULL);
 
-       LDKAccess ret = {
-               .this_arg = (void*) calls,
-               .get_utxo = get_utxo_jcall,
-               .free = LDKAccess_JCalls_free,
-       };
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKAccess_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKAccess *res_ptr = MALLOC(sizeof(LDKAccess), "LDKAccess");
-       *res_ptr = LDKAccess_init(env, clz, o);
-       return (long)res_ptr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = CommitmentTransaction_clone(&o_conv);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Access_1get_1utxo(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray genesis_hash, int64_t short_channel_id) {
-       LDKAccess* this_arg_conv = (LDKAccess*)this_arg;
-       unsigned char genesis_hash_arr[32];
-       CHECK((*env)->GetArrayLength(env, genesis_hash) == 32);
-       (*env)->GetByteArrayRegion(env, genesis_hash, 0, 32, genesis_hash_arr);
-       unsigned char (*genesis_hash_ref)[32] = &genesis_hash_arr;
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = (this_arg_conv->get_utxo)(this_arg_conv->this_arg, genesis_hash_ref, short_channel_id);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-typedef struct LDKFilter_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID register_tx_meth;
-       jmethodID register_output_meth;
-} LDKFilter_JCalls;
-static void LDKFilter_JCalls_free(void* this_arg) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_CommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CommitmentTransactionDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTrustedCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       // Warning: we need a move here but no clone is available for LDKTrustedCommitmentTransaction
+       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
+       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
+       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_err();
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TrustedCommitmentTransactionNoneZ _res_conv = *(LDKCResult_TrustedCommitmentTransactionNoneZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TrustedCommitmentTransactionNoneZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok(JNIEnv *env, jclass clz, jobjectArray o) {
+       LDKCVec_SignatureZ o_constr;
+       o_constr.datalen = (*env)->GetArrayLength(env, o);
+       if (o_constr.datalen > 0)
+               o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
+       else
+               o_constr.data = NULL;
+       for (size_t i = 0; i < o_constr.datalen; i++) {
+               int8_tArray o_conv_8 = (*env)->GetObjectArrayElement(env, o, i);
+               LDKSignature o_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, o_conv_8) == 64);
+               (*env)->GetByteArrayRegion(env, o_conv_8, 0, 64, o_conv_8_ref.compact_form);
+               o_constr.data[i] = o_conv_8_ref;
        }
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_ok(o_constr);
+       return (long)ret_conv;
 }
-void register_tx_jcall(const void* this_arg, const uint8_t (* txid)[32], LDKu8slice script_pubkey) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray txid_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, txid_arr, 0, 32, *txid);
-       LDKu8slice script_pubkey_var = script_pubkey;
-       int8_tArray script_pubkey_arr = (*env)->NewByteArray(env, script_pubkey_var.datalen);
-       (*env)->SetByteArrayRegion(env, script_pubkey_arr, 0, script_pubkey_var.datalen, script_pubkey_var.data);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_err();
+       return (long)ret_conv;
 }
-void register_output_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKOutPoint outpoint_var = *outpoint;
-       outpoint_var = OutPoint_clone(outpoint);
-       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long outpoint_ref = (long)outpoint_var.inner;
-       if (outpoint_var.is_owned) {
-               outpoint_ref |= 1;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CVec_SignatureZNoneZ _res_conv = *(LDKCResult_CVec_SignatureZNoneZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CVec_SignatureZNoneZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CVec_SignatureZNoneZ* orig_conv = (LDKCResult_CVec_SignatureZNoneZ*)(orig & ~1);
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_MessageSendEventZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t s = 0; s < _res_constr.datalen; s++) {
+               int64_t _res_conv_18 = _res_vals[s];
+               LDKMessageSendEvent _res_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)_res_conv_18) & ~1);
+               FREE((void*)_res_conv_18);
+               _res_constr.data[s] = _res_conv_18_conv;
        }
-       LDKu8slice script_pubkey_var = script_pubkey;
-       int8_tArray script_pubkey_arr = (*env)->NewByteArray(env, script_pubkey_var.datalen);
-       (*env)->SetByteArrayRegion(env, script_pubkey_arr, 0, script_pubkey_var.datalen, script_pubkey_var.data);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_MessageSendEventZ_free(_res_constr);
 }
-static void* LDKFilter_JCalls_clone(const void* this_arg) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok(JNIEnv *env, jclass clz, jboolean o) {
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = CResult_boolLightningErrorZ_ok(o);
+       return (long)ret_conv;
 }
-static inline LDKFilter LDKFilter_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKFilter_JCalls *calls = MALLOC(sizeof(LDKFilter_JCalls), "LDKFilter_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->register_tx_meth = (*env)->GetMethodID(env, c, "register_tx", "([B[B)V");
-       CHECK(calls->register_tx_meth != NULL);
-       calls->register_output_meth = (*env)->GetMethodID(env, c, "register_output", "(J[B)V");
-       CHECK(calls->register_output_meth != NULL);
 
-       LDKFilter ret = {
-               .this_arg = (void*) calls,
-               .register_tx = register_tx_jcall,
-               .register_output = register_output_jcall,
-               .free = LDKFilter_JCalls_free,
-       };
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKLightningError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = LightningError_clone(&e_conv);
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = CResult_boolLightningErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKFilter_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKFilter *res_ptr = MALLOC(sizeof(LDKFilter), "LDKFilter");
-       *res_ptr = LDKFilter_init(env, clz, o);
-       return (long)res_ptr;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_boolLightningErrorZ _res_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_boolLightningErrorZ_free(_res_conv);
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1tx(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray txid, int8_tArray script_pubkey) {
-       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
-       unsigned char txid_arr[32];
-       CHECK((*env)->GetArrayLength(env, txid) == 32);
-       (*env)->GetByteArrayRegion(env, txid, 0, 32, txid_arr);
-       unsigned char (*txid_ref)[32] = &txid_arr;
-       LDKu8slice script_pubkey_ref;
-       script_pubkey_ref.datalen = (*env)->GetArrayLength(env, script_pubkey);
-       script_pubkey_ref.data = (*env)->GetByteArrayElements (env, script_pubkey, NULL);
-       (this_arg_conv->register_tx)(this_arg_conv->this_arg, txid_ref, script_pubkey_ref);
-       (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_boolLightningErrorZ* orig_conv = (LDKCResult_boolLightningErrorZ*)(orig & ~1);
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = CResult_boolLightningErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output(JNIEnv *env, jclass clz, int64_t this_arg, int64_t outpoint, int8_tArray script_pubkey) {
-       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
-       LDKOutPoint outpoint_conv;
-       outpoint_conv.inner = (void*)(outpoint & (~1));
-       outpoint_conv.is_owned = false;
-       LDKu8slice script_pubkey_ref;
-       script_pubkey_ref.datalen = (*env)->GetArrayLength(env, script_pubkey);
-       script_pubkey_ref.data = (*env)->GetByteArrayElements (env, script_pubkey, NULL);
-       (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
-       (*env)->ReleaseByteArrayElements(env, script_pubkey, (int8_t*)script_pubkey_ref.data, 0);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* orig_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(orig & ~1);
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+       return (long)ret_ref;
 }
 
-typedef struct LDKPersist_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID persist_new_channel_meth;
-       jmethodID update_persisted_channel_meth;
-} 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) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
-       }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_t c) {
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = ChannelAnnouncement_clone(&a_conv);
+       LDKChannelUpdate b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelUpdate_clone(&b_conv);
+       LDKChannelUpdate c_conv;
+       c_conv.inner = (void*)(c & (~1));
+       c_conv.is_owned = (c & 1) || (c == 0);
+       c_conv = ChannelUpdate_clone(&c_conv);
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+       return (long)ret_ref;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitor * data) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKOutPoint id_var = id;
-       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long id_ref = (long)id_var.inner;
-       if (id_var.is_owned) {
-               id_ref |= 1;
-       }
-       LDKChannelMonitor data_var = *data;
-       data_var = ChannelMonitor_clone(data);
-       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long data_ref = (long)data_var.inner;
-       if (data_var.is_owned) {
-               data_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->persist_new_channel_meth, id_ref, data_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
-       return ret_conv;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res_conv);
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKOutPoint id_var = id;
-       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long id_ref = (long)id_var.inner;
-       if (id_var.is_owned) {
-               id_ref |= 1;
-       }
-       LDKChannelMonitorUpdate update_var = *update;
-       update_var = ChannelMonitorUpdate_clone(update);
-       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long update_ref = (long)update_var.inner;
-       if (update_var.is_owned) {
-               update_ref |= 1;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ 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_63 = _res_vals[l];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_63) & ~1);
+               FREE((void*)_res_conv_63);
+               _res_constr.data[l] = _res_conv_63_conv;
        }
-       LDKChannelMonitor data_var = *data;
-       data_var = ChannelMonitor_clone(data);
-       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long data_ref = (long)data_var.inner;
-       if (data_var.is_owned) {
-               data_ref |= 1;
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_NodeAnnouncementZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t s = 0; s < _res_constr.datalen; s++) {
+               int64_t _res_conv_18 = _res_vals[s];
+               LDKNodeAnnouncement _res_conv_18_conv;
+               _res_conv_18_conv.inner = (void*)(_res_conv_18 & (~1));
+               _res_conv_18_conv.is_owned = (_res_conv_18 & 1) || (_res_conv_18 == 0);
+               _res_constr.data[s] = _res_conv_18_conv;
        }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(*env)->CallLongMethod(env, obj, j_calls->update_persisted_channel_meth, id_ref, update_ref, data_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
-       return ret_conv;
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_NodeAnnouncementZ_free(_res_constr);
 }
-static void* LDKPersist_JCalls_clone(const void* this_arg) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = CResult_NoneLightningErrorZ_ok();
+       return (long)ret_conv;
 }
-static inline LDKPersist LDKPersist_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->persist_new_channel_meth = (*env)->GetMethodID(env, c, "persist_new_channel", "(JJ)J");
-       CHECK(calls->persist_new_channel_meth != NULL);
-       calls->update_persisted_channel_meth = (*env)->GetMethodID(env, c, "update_persisted_channel", "(JJJ)J");
-       CHECK(calls->update_persisted_channel_meth != NULL);
 
-       LDKPersist ret = {
-               .this_arg = (void*) calls,
-               .persist_new_channel = persist_new_channel_jcall,
-               .update_persisted_channel = update_persisted_channel_jcall,
-               .free = LDKPersist_JCalls_free,
-       };
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKLightningError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = LightningError_clone(&e_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = CResult_NoneLightningErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NoneLightningErrorZ _res_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NoneLightningErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NoneLightningErrorZ* orig_conv = (LDKCResult_NoneLightningErrorZ*)(orig & ~1);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = CResult_NoneLightningErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist");
-       *res_ptr = LDKPersist_init(env, clz, o);
-       return (long)res_ptr;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+       LDKCVec_PublicKeyZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ 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);
+               LDKPublicKey _res_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, _res_conv_8) == 33);
+               (*env)->GetByteArrayRegion(env, _res_conv_8, 0, 33, _res_conv_8_ref.compressed_form);
+               _res_constr.data[i] = _res_conv_8_ref;
+       }
+       CVec_PublicKeyZ_free(_res_constr);
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t id, int64_t data) {
-       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
-       LDKOutPoint id_conv;
-       id_conv.inner = (void*)(id & (~1));
-       id_conv.is_owned = (id & 1) || (id == 0);
-       id_conv = OutPoint_clone(&id_conv);
-       LDKChannelMonitor data_conv;
-       data_conv.inner = (void*)(data & (~1));
-       data_conv.is_owned = false;
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, id_conv, &data_conv);
+
+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_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
+       LDKCVec_u8Z o_ref;
+       o_ref.datalen = (*env)->GetArrayLength(env, o);
+       o_ref.data = MALLOC(o_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_ok(o_ref);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int64_t id, int64_t update, int64_t data) {
-       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
-       LDKOutPoint id_conv;
-       id_conv.inner = (void*)(id & (~1));
-       id_conv.is_owned = (id & 1) || (id == 0);
-       id_conv = OutPoint_clone(&id_conv);
-       LDKChannelMonitorUpdate update_conv;
-       update_conv.inner = (void*)(update & (~1));
-       update_conv.is_owned = false;
-       LDKChannelMonitor data_conv;
-       data_conv.inner = (void*)(data & (~1));
-       data_conv.is_owned = false;
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, id_conv, &update_conv, &data_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-typedef struct LDKChannelMessageHandler_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
-       jmethodID handle_open_channel_meth;
-       jmethodID handle_accept_channel_meth;
-       jmethodID handle_funding_created_meth;
-       jmethodID handle_funding_signed_meth;
-       jmethodID handle_funding_locked_meth;
-       jmethodID handle_shutdown_meth;
-       jmethodID handle_closing_signed_meth;
-       jmethodID handle_update_add_htlc_meth;
-       jmethodID handle_update_fulfill_htlc_meth;
-       jmethodID handle_update_fail_htlc_meth;
-       jmethodID handle_update_fail_malformed_htlc_meth;
-       jmethodID handle_commitment_signed_meth;
-       jmethodID handle_revoke_and_ack_meth;
-       jmethodID handle_update_fee_meth;
-       jmethodID handle_announcement_signatures_meth;
-       jmethodID peer_disconnected_meth;
-       jmethodID peer_connected_meth;
-       jmethodID handle_channel_reestablish_meth;
-       jmethodID handle_error_meth;
-} LDKChannelMessageHandler_JCalls;
-static void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
-       }
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CVec_u8ZPeerHandleErrorZ _res_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CVec_u8ZPeerHandleErrorZ_free(_res_conv);
 }
-void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKInitFeatures their_features_var = their_features;
-       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long their_features_ref = (long)their_features_var.inner;
-       if (their_features_var.is_owned) {
-               their_features_ref |= 1;
-       }
-       LDKOpenChannel msg_var = *msg;
-       msg_var = OpenChannel_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_open_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* orig_conv = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKInitFeatures their_features_var = their_features;
-       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long their_features_ref = (long)their_features_var.inner;
-       if (their_features_var.is_owned) {
-               their_features_ref |= 1;
-       }
-       LDKAcceptChannel msg_var = *msg;
-       msg_var = AcceptChannel_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_accept_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_ok();
+       return (long)ret_conv;
 }
-void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKFundingCreated msg_var = *msg;
-       msg_var = FundingCreated_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_created_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKFundingSigned msg_var = *msg;
-       msg_var = FundingSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_signed_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NonePeerHandleErrorZ _res_conv = *(LDKCResult_NonePeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NonePeerHandleErrorZ_free(_res_conv);
 }
-void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKFundingLocked msg_var = *msg;
-       msg_var = FundingLocked_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_funding_locked_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NonePeerHandleErrorZ* orig_conv = (LDKCResult_NonePeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKShutdown msg_var = *msg;
-       msg_var = Shutdown_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_shutdown_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, jboolean o) {
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_ok(o);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKClosingSigned msg_var = *msg;
-       msg_var = ClosingSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_closing_signed_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_boolPeerHandleErrorZ _res_conv = *(LDKCResult_boolPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_boolPeerHandleErrorZ_free(_res_conv);
 }
-void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKUpdateAddHTLC msg_var = *msg;
-       msg_var = UpdateAddHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_add_htlc_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_boolPeerHandleErrorZ* orig_conv = (LDKCResult_boolPeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKUpdateFulfillHTLC msg_var = *msg;
-       msg_var = UpdateFulfillHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fulfill_htlc_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInitFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = InitFeatures_clone(&o_conv);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = CResult_InitFeaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKUpdateFailHTLC msg_var = *msg;
-       msg_var = UpdateFailHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fail_htlc_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKUpdateFailMalformedHTLC msg_var = *msg;
-       msg_var = UpdateFailMalformedHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fail_malformed_htlc_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_InitFeaturesDecodeErrorZ _res_conv = *(LDKCResult_InitFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_InitFeaturesDecodeErrorZ_free(_res_conv);
 }
-void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKCommitmentSigned msg_var = *msg;
-       msg_var = CommitmentSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_commitment_signed_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNodeFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeFeatures_clone(&o_conv);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = CResult_NodeFeaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKRevokeAndACK msg_var = *msg;
-       msg_var = RevokeAndACK_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_revoke_and_ack_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKUpdateFee msg_var = *msg;
-       msg_var = UpdateFee_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_update_fee_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NodeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_NodeFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NodeFeaturesDecodeErrorZ_free(_res_conv);
 }
-void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKAnnouncementSignatures msg_var = *msg;
-       msg_var = AnnouncementSignatures_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_announcement_signatures_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelFeatures_clone(&o_conv);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->peer_disconnected_meth, their_node_id_arr, no_connection_possible);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKInit msg_var = *msg;
-       msg_var = Init_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelFeaturesDecodeErrorZ_free(_res_conv);
 }
-void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKChannelReestablish msg_var = *msg;
-       msg_var = ChannelReestablish_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_channel_reestablish_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelConfig o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelConfig_clone(&o_conv);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKErrorMessage msg_var = *msg;
-       msg_var = ErrorMessage_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_error_meth, their_node_id_arr, msg_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-static void* LDKChannelMessageHandler_JCalls_clone(const void* this_arg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelConfigDecodeErrorZ _res_conv = *(LDKCResult_ChannelConfigDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelConfigDecodeErrorZ_free(_res_conv);
 }
-static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKChannelMessageHandler_JCalls *calls = MALLOC(sizeof(LDKChannelMessageHandler_JCalls), "LDKChannelMessageHandler_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->handle_open_channel_meth = (*env)->GetMethodID(env, c, "handle_open_channel", "([BJJ)V");
-       CHECK(calls->handle_open_channel_meth != NULL);
-       calls->handle_accept_channel_meth = (*env)->GetMethodID(env, c, "handle_accept_channel", "([BJJ)V");
-       CHECK(calls->handle_accept_channel_meth != NULL);
-       calls->handle_funding_created_meth = (*env)->GetMethodID(env, c, "handle_funding_created", "([BJ)V");
-       CHECK(calls->handle_funding_created_meth != NULL);
-       calls->handle_funding_signed_meth = (*env)->GetMethodID(env, c, "handle_funding_signed", "([BJ)V");
-       CHECK(calls->handle_funding_signed_meth != NULL);
-       calls->handle_funding_locked_meth = (*env)->GetMethodID(env, c, "handle_funding_locked", "([BJ)V");
-       CHECK(calls->handle_funding_locked_meth != NULL);
-       calls->handle_shutdown_meth = (*env)->GetMethodID(env, c, "handle_shutdown", "([BJ)V");
-       CHECK(calls->handle_shutdown_meth != NULL);
-       calls->handle_closing_signed_meth = (*env)->GetMethodID(env, c, "handle_closing_signed", "([BJ)V");
-       CHECK(calls->handle_closing_signed_meth != NULL);
-       calls->handle_update_add_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_add_htlc", "([BJ)V");
-       CHECK(calls->handle_update_add_htlc_meth != NULL);
-       calls->handle_update_fulfill_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fulfill_htlc", "([BJ)V");
-       CHECK(calls->handle_update_fulfill_htlc_meth != NULL);
-       calls->handle_update_fail_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_htlc", "([BJ)V");
-       CHECK(calls->handle_update_fail_htlc_meth != NULL);
-       calls->handle_update_fail_malformed_htlc_meth = (*env)->GetMethodID(env, c, "handle_update_fail_malformed_htlc", "([BJ)V");
-       CHECK(calls->handle_update_fail_malformed_htlc_meth != NULL);
-       calls->handle_commitment_signed_meth = (*env)->GetMethodID(env, c, "handle_commitment_signed", "([BJ)V");
-       CHECK(calls->handle_commitment_signed_meth != NULL);
-       calls->handle_revoke_and_ack_meth = (*env)->GetMethodID(env, c, "handle_revoke_and_ack", "([BJ)V");
-       CHECK(calls->handle_revoke_and_ack_meth != NULL);
-       calls->handle_update_fee_meth = (*env)->GetMethodID(env, c, "handle_update_fee", "([BJ)V");
-       CHECK(calls->handle_update_fee_meth != NULL);
-       calls->handle_announcement_signatures_meth = (*env)->GetMethodID(env, c, "handle_announcement_signatures", "([BJ)V");
-       CHECK(calls->handle_announcement_signatures_meth != NULL);
-       calls->peer_disconnected_meth = (*env)->GetMethodID(env, c, "peer_disconnected", "([BZ)V");
-       CHECK(calls->peer_disconnected_meth != NULL);
-       calls->peer_connected_meth = (*env)->GetMethodID(env, c, "peer_connected", "([BJ)V");
-       CHECK(calls->peer_connected_meth != NULL);
-       calls->handle_channel_reestablish_meth = (*env)->GetMethodID(env, c, "handle_channel_reestablish", "([BJ)V");
-       CHECK(calls->handle_channel_reestablish_meth != NULL);
-       calls->handle_error_meth = (*env)->GetMethodID(env, c, "handle_error", "([BJ)V");
-       CHECK(calls->handle_error_meth != NULL);
 
-       LDKChannelMessageHandler ret = {
-               .this_arg = (void*) calls,
-               .handle_open_channel = handle_open_channel_jcall,
-               .handle_accept_channel = handle_accept_channel_jcall,
-               .handle_funding_created = handle_funding_created_jcall,
-               .handle_funding_signed = handle_funding_signed_jcall,
-               .handle_funding_locked = handle_funding_locked_jcall,
-               .handle_shutdown = handle_shutdown_jcall,
-               .handle_closing_signed = handle_closing_signed_jcall,
-               .handle_update_add_htlc = handle_update_add_htlc_jcall,
-               .handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall,
-               .handle_update_fail_htlc = handle_update_fail_htlc_jcall,
-               .handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall,
-               .handle_commitment_signed = handle_commitment_signed_jcall,
-               .handle_revoke_and_ack = handle_revoke_and_ack_jcall,
-               .handle_update_fee = handle_update_fee_jcall,
-               .handle_announcement_signatures = handle_announcement_signatures_jcall,
-               .peer_disconnected = peer_disconnected_jcall,
-               .peer_connected = peer_connected_jcall,
-               .handle_channel_reestablish = handle_channel_reestablish_jcall,
-               .handle_error = handle_error_jcall,
-               .free = LDKChannelMessageHandler_JCalls_free,
-               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(env, clz, MessageSendEventsProvider),
-       };
-       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelConfigDecodeErrorZ* orig_conv = (LDKCResult_ChannelConfigDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new(JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
-       LDKChannelMessageHandler *res_ptr = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
-       *res_ptr = LDKChannelMessageHandler_init(env, clz, o, MessageSendEventsProvider);
-       return (long)res_ptr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKDirectionalChannelInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = DirectionalChannelInfo_clone(&o_conv);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1open_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t their_features, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKInitFeatures their_features_conv;
-       their_features_conv.inner = (void*)(their_features & (~1));
-       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
-       LDKOpenChannel msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_open_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1accept_1channel(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t their_features, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKInitFeatures their_features_conv;
-       their_features_conv.inner = (void*)(their_features & (~1));
-       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
-       LDKAcceptChannel msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_accept_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ _res_conv = *(LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_DirectionalChannelInfoDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1created(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKFundingCreated msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_created)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* orig_conv = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKFundingSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelInfo_clone(&o_conv);
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_ChannelInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1locked(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKFundingLocked msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_ChannelInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1shutdown(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKShutdown msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_shutdown)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelInfoDecodeErrorZ _res_conv = *(LDKCResult_ChannelInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelInfoDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1closing_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKClosingSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_closing_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelInfoDecodeErrorZ* orig_conv = (LDKCResult_ChannelInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_ChannelInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1add_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKUpdateAddHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_add_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRoutingFees o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = RoutingFees_clone(&o_conv);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fulfill_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKUpdateFulfillHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fulfill_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_RoutingFeesDecodeErrorZ _res_conv = *(LDKCResult_RoutingFeesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_RoutingFeesDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RoutingFeesDecodeErrorZ* orig_conv = (LDKCResult_RoutingFeesDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_NetAddressZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNetAddress), "LDKCVec_NetAddressZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               int64_t _res_conv_12 = _res_vals[m];
+               LDKNetAddress _res_conv_12_conv = *(LDKNetAddress*)(((uint64_t)_res_conv_12) & ~1);
+               FREE((void*)_res_conv_12);
+               _res_constr.data[m] = _res_conv_12_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_NetAddressZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKUpdateFailHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fail_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNodeAnnouncementInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeAnnouncementInfo_clone(&o_conv);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1malformed_1htlc(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKUpdateFailMalformedHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fail_malformed_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1commitment_1signed(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKCommitmentSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_commitment_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1revoke_1and_1ack(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKRevokeAndACK msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_revoke_and_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fee(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKUpdateFee msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fee)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_u64Z _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(int64_t), "LDKCVec_u64Z Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t g = 0; g < _res_constr.datalen; g++) {
+               int64_t _res_conv_6 = _res_vals[g];
+               _res_constr.data[g] = _res_conv_6;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_u64Z_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1announcement_1signatures(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKAnnouncementSignatures msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_announcement_signatures)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNodeInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeInfo_clone(&o_conv);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1disconnected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKInit msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NodeInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NodeInfoDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1channel_1reestablish(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKChannelReestablish msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_channel_reestablish)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NodeInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1error(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       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);
-       LDKErrorMessage msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_error)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNetworkGraph o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NetworkGraph_clone(&o_conv);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-typedef struct LDKRoutingMessageHandler_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
-       jmethodID handle_node_announcement_meth;
-       jmethodID handle_channel_announcement_meth;
-       jmethodID handle_channel_update_meth;
-       jmethodID handle_htlc_fail_channel_update_meth;
-       jmethodID get_next_channel_announcements_meth;
-       jmethodID get_next_node_announcements_meth;
-       jmethodID sync_routing_table_meth;
-       jmethodID handle_reply_channel_range_meth;
-       jmethodID handle_reply_short_channel_ids_end_meth;
-       jmethodID handle_query_channel_range_meth;
-       jmethodID handle_query_short_channel_ids_meth;
-} LDKRoutingMessageHandler_JCalls;
-static void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
-       }
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKNodeAnnouncement msg_var = *msg;
-       msg_var = NodeAnnouncement_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_node_announcement_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NetworkGraphDecodeErrorZ _res_conv = *(LDKCResult_NetworkGraphDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
 }
-LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKChannelAnnouncement msg_var = *msg;
-       msg_var = ChannelAnnouncement_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_channel_announcement_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NetworkGraphDecodeErrorZ* orig_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKChannelUpdate msg_var = *msg;
-       msg_var = ChannelUpdate_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_channel_update_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
+       LDKTransaction b_ref;
+       b_ref.datalen = (*env)->GetArrayLength(env, b);
+       b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
+       b_ref.data_is_owned = true;
+       LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       *ret_ref = C2Tuple_usizeTransactionZ_new(a, b_ref);
+       return (long)ret_ref;
 }
-void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate * update) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       long ret_update = (long)update;
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->handle_htlc_fail_channel_update_meth, ret_update);
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_usizeTransactionZ _res_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_usizeTransactionZ_free(_res_conv);
 }
-LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_next_channel_announcements_meth, starting_point, batch_amount);
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_constr;
-       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C2Tuple_usizeTransactionZZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_usizeTransactionZ), "LDKCVec_C2Tuple_usizeTransactionZZ Elements");
        else
-               arg_constr.data = NULL;
-       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
-       for (size_t l = 0; l < arg_constr.datalen; l++) {
-               int64_t arr_conv_63 = arg_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
-               FREE((void*)arr_conv_63);
-               arg_constr.data[l] = arr_conv_63_conv;
+               _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];
+               LDKC2Tuple_usizeTransactionZ _res_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_24) & ~1);
+               FREE((void*)_res_conv_24);
+               _res_constr.data[y] = _res_conv_24_conv;
        }
-       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
-       return arg_constr;
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
 }
-LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       int8_tArray starting_point_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, starting_point_arr, 0, 33, starting_point.compressed_form);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       int64_tArray arg = (*env)->CallObjectMethod(env, obj, j_calls->get_next_node_announcements_meth, starting_point_arr, batch_amount);
-       LDKCVec_NodeAnnouncementZ arg_constr;
-       arg_constr.datalen = (*env)->GetArrayLength(env, arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
-       else
-               arg_constr.data = NULL;
-       int64_t* arg_vals = (*env)->GetLongArrayElements (env, arg, NULL);
-       for (size_t s = 0; s < arg_constr.datalen; s++) {
-               int64_t arr_conv_18 = arg_vals[s];
-               LDKNodeAnnouncement arr_conv_18_conv;
-               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
-               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
-               arr_conv_18_conv = NodeAnnouncement_clone(&arr_conv_18_conv);
-               arg_constr.data[s] = arr_conv_18_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, arg, arg_vals, 0);
-       return arg_constr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_ok();
+       return (long)ret_conv;
 }
-void sync_routing_table_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKInit init_var = *init;
-       init_var = Init_clone(init);
-       CHECK((((long)init_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&init_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long init_ref = (long)init_var.inner;
-       if (init_var.is_owned) {
-               init_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->sync_routing_table_meth, their_node_id_arr, init_ref);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKChannelMonitorUpdateErr e_conv = LDKChannelMonitorUpdateErr_from_java(env, e);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_err(e_conv);
+       return (long)ret_conv;
 }
-LDKCResult_NoneLightningErrorZ handle_reply_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKReplyChannelRange msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_reply_channel_range_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NoneChannelMonitorUpdateErrZ _res_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NoneChannelMonitorUpdateErrZ_free(_res_conv);
 }
-LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyShortChannelIdsEnd msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKReplyShortChannelIdsEnd msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_reply_short_channel_ids_end_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NoneChannelMonitorUpdateErrZ* orig_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(orig & ~1);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-LDKCResult_NoneLightningErrorZ handle_query_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryChannelRange msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKQueryChannelRange msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_MonitorEventZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t o = 0; o < _res_constr.datalen; o++) {
+               int64_t _res_conv_14 = _res_vals[o];
+               LDKMonitorEvent _res_conv_14_conv = *(LDKMonitorEvent*)(((uint64_t)_res_conv_14) & ~1);
+               FREE((void*)_res_conv_14);
+               _res_constr.data[o] = _res_conv_14_conv;
        }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_query_channel_range_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_MonitorEventZ_free(_res_constr);
 }
-LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryShortChannelIds msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == 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);
-       LDKQueryShortChannelIds msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_EventZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+       else
+               _res_constr.data = NULL;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t h = 0; h < _res_constr.datalen; h++) {
+               int64_t _res_conv_7 = _res_vals[h];
+               LDKEvent _res_conv_7_conv = *(LDKEvent*)(((uint64_t)_res_conv_7) & ~1);
+               FREE((void*)_res_conv_7);
+               _res_constr.data[h] = _res_conv_7_conv;
        }
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)(*env)->CallLongMethod(env, obj, j_calls->handle_query_short_channel_ids_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
-}
-static void* LDKRoutingMessageHandler_JCalls_clone(const void* this_arg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_EventZ_free(_res_constr);
 }
-static inline LDKRoutingMessageHandler LDKRoutingMessageHandler_init (JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKRoutingMessageHandler_JCalls *calls = MALLOC(sizeof(LDKRoutingMessageHandler_JCalls), "LDKRoutingMessageHandler_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->handle_node_announcement_meth = (*env)->GetMethodID(env, c, "handle_node_announcement", "(J)J");
-       CHECK(calls->handle_node_announcement_meth != NULL);
-       calls->handle_channel_announcement_meth = (*env)->GetMethodID(env, c, "handle_channel_announcement", "(J)J");
-       CHECK(calls->handle_channel_announcement_meth != NULL);
-       calls->handle_channel_update_meth = (*env)->GetMethodID(env, c, "handle_channel_update", "(J)J");
-       CHECK(calls->handle_channel_update_meth != NULL);
-       calls->handle_htlc_fail_channel_update_meth = (*env)->GetMethodID(env, c, "handle_htlc_fail_channel_update", "(J)V");
-       CHECK(calls->handle_htlc_fail_channel_update_meth != NULL);
-       calls->get_next_channel_announcements_meth = (*env)->GetMethodID(env, c, "get_next_channel_announcements", "(JB)[J");
-       CHECK(calls->get_next_channel_announcements_meth != NULL);
-       calls->get_next_node_announcements_meth = (*env)->GetMethodID(env, c, "get_next_node_announcements", "([BB)[J");
-       CHECK(calls->get_next_node_announcements_meth != NULL);
-       calls->sync_routing_table_meth = (*env)->GetMethodID(env, c, "sync_routing_table", "([BJ)V");
-       CHECK(calls->sync_routing_table_meth != NULL);
-       calls->handle_reply_channel_range_meth = (*env)->GetMethodID(env, c, "handle_reply_channel_range", "([BJ)J");
-       CHECK(calls->handle_reply_channel_range_meth != NULL);
-       calls->handle_reply_short_channel_ids_end_meth = (*env)->GetMethodID(env, c, "handle_reply_short_channel_ids_end", "([BJ)J");
-       CHECK(calls->handle_reply_short_channel_ids_end_meth != NULL);
-       calls->handle_query_channel_range_meth = (*env)->GetMethodID(env, c, "handle_query_channel_range", "([BJ)J");
-       CHECK(calls->handle_query_channel_range_meth != NULL);
-       calls->handle_query_short_channel_ids_meth = (*env)->GetMethodID(env, c, "handle_query_short_channel_ids", "([BJ)J");
-       CHECK(calls->handle_query_short_channel_ids_meth != NULL);
 
-       LDKRoutingMessageHandler ret = {
-               .this_arg = (void*) calls,
-               .handle_node_announcement = handle_node_announcement_jcall,
-               .handle_channel_announcement = handle_channel_announcement_jcall,
-               .handle_channel_update = handle_channel_update_jcall,
-               .handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall,
-               .get_next_channel_announcements = get_next_channel_announcements_jcall,
-               .get_next_node_announcements = get_next_node_announcements_jcall,
-               .sync_routing_table = sync_routing_table_jcall,
-               .handle_reply_channel_range = handle_reply_channel_range_jcall,
-               .handle_reply_short_channel_ids_end = handle_reply_short_channel_ids_end_jcall,
-               .handle_query_channel_range = handle_query_channel_range_jcall,
-               .handle_query_short_channel_ids = handle_query_short_channel_ids_jcall,
-               .free = LDKRoutingMessageHandler_JCalls_free,
-               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(env, clz, MessageSendEventsProvider),
-       };
-       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
-       return ret;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new(JNIEnv *env, jclass clz, jobject o, jobject MessageSendEventsProvider) {
-       LDKRoutingMessageHandler *res_ptr = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
-       *res_ptr = LDKRoutingMessageHandler_init(env, clz, o, MessageSendEventsProvider);
-       return (long)res_ptr;
-}
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1node_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKNodeAnnouncement msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOutPoint o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = OutPoint_clone(&o_conv);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1announcement(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKChannelAnnouncement msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1update(JNIEnv *env, jclass clz, int64_t this_arg, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKChannelUpdate msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, &msg_conv);
-       return (long)ret_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_OutPointDecodeErrorZ _res_conv = *(LDKCResult_OutPointDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_OutPointDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1htlc_1fail_1channel_1update(JNIEnv *env, jclass clz, int64_t this_arg, int64_t update) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKHTLCFailChannelUpdate* update_conv = (LDKHTLCFailChannelUpdate*)update;
-       (this_arg_conv->handle_htlc_fail_channel_update)(this_arg_conv->this_arg, update_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OutPointDecodeErrorZ* orig_conv = (LDKCResult_OutPointDecodeErrorZ*)(orig & ~1);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1channel_1announcements(JNIEnv *env, jclass clz, int64_t this_arg, int64_t starting_point, int8_t batch_amount) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
-       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
-       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t l = 0; l < ret_var.datalen; l++) {
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* arr_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-               *arr_conv_63_ref = ret_var.data[l];
-               ret_arr_ptr[l] = (long)arr_conv_63_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_CResult_1ChannelMonitorUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelMonitorUpdate o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelMonitorUpdate_clone(&o_conv);
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1node_1announcements(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray starting_point, int8_t batch_amount) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey starting_point_ref;
-       CHECK((*env)->GetArrayLength(env, starting_point) == 33);
-       (*env)->GetByteArrayRegion(env, starting_point, 0, 33, starting_point_ref.compressed_form);
-       LDKCVec_NodeAnnouncementZ ret_var = (this_arg_conv->get_next_node_announcements)(this_arg_conv->this_arg, starting_point_ref, batch_amount);
-       int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
-       int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
-       for (size_t s = 0; s < ret_var.datalen; s++) {
-               LDKNodeAnnouncement arr_conv_18_var = ret_var.data[s];
-               CHECK((((long)arr_conv_18_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_18_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_18_ref = (long)arr_conv_18_var.inner;
-               if (arr_conv_18_var.is_owned) {
-                       arr_conv_18_ref |= 1;
-               }
-               ret_arr_ptr[s] = arr_conv_18_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_CResult_1ChannelMonitorUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1sync_1routing_1table(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t init) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       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);
-       LDKInit init_conv;
-       init_conv.inner = (void*)(init & (~1));
-       init_conv.is_owned = false;
-       (this_arg_conv->sync_routing_table)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res_conv = *(LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1channel_1range(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       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);
-       LDKReplyChannelRange msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = ReplyChannelRange_clone(&msg_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_reply_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* orig_conv = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1short_1channel_1ids_1end(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       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);
-       LDKReplyShortChannelIdsEnd msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = ReplyShortChannelIdsEnd_clone(&msg_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_reply_short_channel_ids_end)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKHTLCUpdate o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = HTLCUpdate_clone(&o_conv);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1channel_1range(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       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);
-       LDKQueryChannelRange msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = QueryChannelRange_clone(&msg_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_query_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray their_node_id, int64_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       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);
-       LDKQueryShortChannelIds msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = QueryShortChannelIds_clone(&msg_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_query_short_channel_ids)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
-       return (long)ret_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_HTLCUpdateDecodeErrorZ _res_conv = *(LDKCResult_HTLCUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_HTLCUpdateDecodeErrorZ_free(_res_conv);
 }
 
-typedef struct LDKSocketDescriptor_JCalls {
-       atomic_size_t refcnt;
-       JavaVM *vm;
-       jweak o;
-       jmethodID send_data_meth;
-       jmethodID disconnect_socket_meth;
-       jmethodID eq_meth;
-       jmethodID hash_meth;
-} LDKSocketDescriptor_JCalls;
-static void LDKSocketDescriptor_JCalls_free(void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               JNIEnv *env;
-               DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-               (*env)->DeleteWeakGlobalRef(env, j_calls->o);
-               FREE(j_calls);
-       }
-}
-uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKu8slice data_var = data;
-       int8_tArray data_arr = (*env)->NewByteArray(env, data_var.datalen);
-       (*env)->SetByteArrayRegion(env, data_arr, 0, data_var.datalen, data_var.data);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallLongMethod(env, obj, j_calls->send_data_meth, data_arr, resume_read);
-}
-void disconnect_socket_jcall(void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallVoidMethod(env, obj, j_calls->disconnect_socket_meth);
-}
-bool eq_jcall(const void* this_arg, const LDKSocketDescriptor * other_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       LDKSocketDescriptor *other_arg_clone = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
-       *other_arg_clone = SocketDescriptor_clone(other_arg);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallBooleanMethod(env, obj, j_calls->eq_meth, (long)other_arg_clone);
-}
-uint64_t hash_jcall(const void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       JNIEnv *env;
-       DO_ASSERT((*j_calls->vm)->GetEnv(j_calls->vm, (void**)&env, JNI_VERSION_1_6) == JNI_OK);
-       jobject obj = (*env)->NewLocalRef(env, j_calls->o);
-       CHECK(obj != NULL);
-       return (*env)->CallLongMethod(env, obj, j_calls->hash_meth);
-}
-static void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_HTLCUpdateDecodeErrorZ* orig_conv = (LDKCResult_HTLCUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-static inline LDKSocketDescriptor LDKSocketDescriptor_init (JNIEnv *env, jclass clz, jobject o) {
-       jclass c = (*env)->GetObjectClass(env, o);
-       CHECK(c != NULL);
-       LDKSocketDescriptor_JCalls *calls = MALLOC(sizeof(LDKSocketDescriptor_JCalls), "LDKSocketDescriptor_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       DO_ASSERT((*env)->GetJavaVM(env, &calls->vm) == 0);
-       calls->o = (*env)->NewWeakGlobalRef(env, o);
-       calls->send_data_meth = (*env)->GetMethodID(env, c, "send_data", "([BZ)J");
-       CHECK(calls->send_data_meth != NULL);
-       calls->disconnect_socket_meth = (*env)->GetMethodID(env, c, "disconnect_socket", "()V");
-       CHECK(calls->disconnect_socket_meth != NULL);
-       calls->eq_meth = (*env)->GetMethodID(env, c, "eq", "(J)Z");
-       CHECK(calls->eq_meth != NULL);
-       calls->hash_meth = (*env)->GetMethodID(env, c, "hash", "()J");
-       CHECK(calls->hash_meth != NULL);
 
-       LDKSocketDescriptor ret = {
-               .this_arg = (void*) calls,
-               .send_data = send_data_jcall,
-               .disconnect_socket = disconnect_socket_jcall,
-               .eq = eq_jcall,
-               .hash = hash_jcall,
-               .clone = LDKSocketDescriptor_JCalls_clone,
-               .free = LDKSocketDescriptor_JCalls_free,
-       };
-       return ret;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NoneMonitorUpdateErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
+       *ret_conv = CResult_NoneMonitorUpdateErrorZ_ok();
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new(JNIEnv *env, jclass clz, jobject o) {
-       LDKSocketDescriptor *res_ptr = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
-       *res_ptr = LDKSocketDescriptor_init(env, clz, o);
-       return (long)res_ptr;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKMonitorUpdateError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = MonitorUpdateError_clone(&e_conv);
+       LDKCResult_NoneMonitorUpdateErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
+       *ret_conv = CResult_NoneMonitorUpdateErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1send_1data(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray data, jboolean resume_read) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       LDKu8slice data_ref;
-       data_ref.datalen = (*env)->GetArrayLength(env, data);
-       data_ref.data = (*env)->GetByteArrayElements (env, data, NULL);
-       int64_t ret_val = (this_arg_conv->send_data)(this_arg_conv->this_arg, data_ref, resume_read);
-       (*env)->ReleaseByteArrayElements(env, data, (int8_t*)data_ref.data, 0);
-       return ret_val;
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NoneMonitorUpdateErrorZ _res_conv = *(LDKCResult_NoneMonitorUpdateErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NoneMonitorUpdateErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1disconnect_1socket(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       (this_arg_conv->disconnect_socket)(this_arg_conv->this_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NoneMonitorUpdateErrorZ* orig_conv = (LDKCResult_NoneMonitorUpdateErrorZ*)(orig & ~1);
+       LDKCResult_NoneMonitorUpdateErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
+       *ret_conv = CResult_NoneMonitorUpdateErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       int64_t ret_val = (this_arg_conv->hash)(this_arg_conv->this_arg);
-       return ret_val;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC2Tuple_OutPointScriptZ* orig_conv = (LDKC2Tuple_OutPointScriptZ*)(orig & ~1);
+       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_ref = C2Tuple_OutPointScriptZ_clone(orig_conv);
+       return (long)ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Transaction_1free(JNIEnv *env, jclass clz, int8_tArray _res) {
-       LDKTransaction _res_ref;
-       _res_ref.datalen = (*env)->GetArrayLength(env, _res);
-       _res_ref.data = MALLOC(_res_ref.datalen, "LDKTransaction Bytes");
-       (*env)->GetByteArrayRegion(env, _res, 0, _res_ref.datalen, _res_ref.data);
-       _res_ref.data_is_owned = true;
-       Transaction_free(_res_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
+       LDKOutPoint a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = OutPoint_clone(&a_conv);
+       LDKCVec_u8Z b_ref;
+       b_ref.datalen = (*env)->GetArrayLength(env, b);
+       b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
+       (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
+       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_ref = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
+       return (long)ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKTxOut _res_conv = *(LDKTxOut*)(((uint64_t)_res) & ~1);
+       LDKC2Tuple_OutPointScriptZ _res_conv = *(LDKC2Tuple_OutPointScriptZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       TxOut_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxOut_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKTxOut* orig_conv = (LDKTxOut*)(orig & ~1);
-       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
-       *ret_ref = TxOut_clone(orig_conv);
-       return (long)ret_ref;
+       C2Tuple_OutPointScriptZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_SpendableOutputDescriptorZ _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(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
        else
                _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t b = 0; b < _res_constr.datalen; b++) {
-               int64_t arr_conv_27 = _res_vals[b];
-               LDKSpendableOutputDescriptor arr_conv_27_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_conv_27) & ~1);
-               FREE((void*)arr_conv_27);
-               _res_constr.data[b] = arr_conv_27_conv;
+       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;
        }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_SpendableOutputDescriptorZ_free(_res_constr);
+       CVec_TransactionZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_MessageSendEventZ _res_constr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
+       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
+       return (long)ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1new(JNIEnv *env, jclass clz, int32_t a, int64_t b) {
+       LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
+       FREE((void*)b);
+       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
+       return (long)ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_u32TxOutZ _res_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_u32TxOutZ_free(_res_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C2Tuple_u32TxOutZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t s = 0; s < _res_constr.datalen; s++) {
-               int64_t arr_conv_18 = _res_vals[s];
-               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
-               FREE((void*)arr_conv_18);
-               _res_constr.data[s] = arr_conv_18_conv;
+       for (size_t a = 0; a < _res_constr.datalen; a++) {
+               int64_t _res_conv_26 = _res_vals[a];
+               LDKC2Tuple_u32TxOutZ _res_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_26) & ~1);
+               FREE((void*)_res_conv_26);
+               _res_constr.data[a] = _res_conv_26_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_MessageSendEventZ_free(_res_constr);
+       CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_EventZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
+       LDKThirtyTwoBytes a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 32);
+       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+       LDKCVec_C2Tuple_u32TxOutZZ b_constr;
+       b_constr.datalen = (*env)->GetArrayLength(env, b);
+       if (b_constr.datalen > 0)
+               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
        else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t h = 0; h < _res_constr.datalen; h++) {
-               int64_t arr_conv_7 = _res_vals[h];
-               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
-               FREE((void*)arr_conv_7);
-               _res_constr.data[h] = arr_conv_7_conv;
+               b_constr.data = NULL;
+       int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
+       for (size_t a = 0; a < b_constr.datalen; a++) {
+               int64_t b_conv_26 = b_vals[a];
+               LDKC2Tuple_u32TxOutZ b_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_26) & ~1);
+               FREE((void*)b_conv_26);
+               b_constr.data[a] = b_conv_26_conv;
        }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_EventZ_free(_res_constr);
+       (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
+       return (long)ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC2Tuple_usizeTransactionZ _res_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res) & ~1);
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C2Tuple_usizeTransactionZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
-       LDKTransaction b_ref;
-       b_ref.datalen = (*env)->GetArrayLength(env, b);
-       b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
-       (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
-       b_ref.data_is_owned = true;
-       LDKC2Tuple_usizeTransactionZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       *ret_ref = C2Tuple_usizeTransactionZ_new(a, b_ref);
-       return (long)ret_ref;
+       C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C2Tuple_usizeTransactionZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_usizeTransactionZ), "LDKCVec_C2Tuple_usizeTransactionZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ 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 arr_conv_24 = _res_vals[y];
-               LDKC2Tuple_usizeTransactionZ arr_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_conv_24) & ~1);
-               FREE((void*)arr_conv_24);
-               _res_constr.data[y] = arr_conv_24_conv;
+       for (size_t u = 0; u < _res_constr.datalen; u++) {
+               int64_t _res_conv_46 = _res_vals[u];
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_46_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_46) & ~1);
+               FREE((void*)_res_conv_46);
+               _res_constr.data[u] = _res_conv_46_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
+       CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_ok();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
+       LDKThirtyTwoBytes a_ref;
+       CHECK((*env)->GetArrayLength(env, a) == 32);
+       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
+       LDKChannelMonitor b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelMonitor_clone(&b_conv);
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+       return (long)ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_BlockHashChannelMonitorZ _res_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_BlockHashChannelMonitorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
+       FREE((void*)o);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKChannelMonitorUpdateErr e_conv = LDKChannelMonitorUpdateErr_from_java(env, e);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NoneChannelMonitorUpdateErrZ _res_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NoneChannelMonitorUpdateErrZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* orig_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(orig & ~1);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(orig_conv);
-       return (long)ret_conv;
+       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_MonitorEventZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_SpendableOutputDescriptorZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t o = 0; o < _res_constr.datalen; o++) {
-               int64_t arr_conv_14 = _res_vals[o];
-               LDKMonitorEvent arr_conv_14_conv;
-               arr_conv_14_conv.inner = (void*)(arr_conv_14 & (~1));
-               arr_conv_14_conv.is_owned = (arr_conv_14 & 1) || (arr_conv_14 == 0);
-               _res_constr.data[o] = arr_conv_14_conv;
+       for (size_t b = 0; b < _res_constr.datalen; b++) {
+               int64_t _res_conv_27 = _res_vals[b];
+               LDKSpendableOutputDescriptor _res_conv_27_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)_res_conv_27) & ~1);
+               FREE((void*)_res_conv_27);
+               _res_constr.data[b] = _res_conv_27_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_MonitorEventZ_free(_res_constr);
+       CVec_SpendableOutputDescriptorZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKChannelMonitorUpdate o_conv;
-       o_conv.inner = (void*)(o & (~1));
-       o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ChannelMonitorUpdate_clone(&o_conv);
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
-       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKTxOut o_conv = *(LDKTxOut*)(((uint64_t)o) & ~1);
+       FREE((void*)o);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = (void*)(e & (~1));
-       e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
-       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
+       LDKAccessError e_conv = LDKAccessError_from_java(env, e);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res_conv = *(LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_TxOutAccessErrorZ _res_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res_conv);
+       CResult_TxOutAccessErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NoneMonitorUpdateErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
-       *ret_conv = CResult_NoneMonitorUpdateErrorZ_ok();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_TxOutAccessErrorZ* orig_conv = (LDKCResult_TxOutAccessErrorZ*)(orig & ~1);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKMonitorUpdateError e_conv;
-       e_conv.inner = (void*)(e & (~1));
-       e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = MonitorUpdateError_clone(&e_conv);
-       LDKCResult_NoneMonitorUpdateErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
-       *ret_conv = CResult_NoneMonitorUpdateErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_ok();
        return (long)ret_conv;
 }
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_NoneMonitorUpdateErrorZ _res_conv = *(LDKCResult_NoneMonitorUpdateErrorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_NoneMonitorUpdateErrorZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NoneMonitorUpdateErrorZ* orig_conv = (LDKCResult_NoneMonitorUpdateErrorZ*)(orig & ~1);
-       LDKCResult_NoneMonitorUpdateErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
-       *ret_conv = CResult_NoneMonitorUpdateErrorZ_clone(orig_conv);
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKAPIError e_conv = *(LDKAPIError*)(((uint64_t)e) & ~1);
+       FREE((void*)e);
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC2Tuple_OutPointScriptZ _res_conv = *(LDKC2Tuple_OutPointScriptZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C2Tuple_OutPointScriptZ_free(_res_conv);
+       CResult_NoneAPIErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new(JNIEnv *env, jclass clz, int64_t a, int8_tArray b) {
-       LDKOutPoint a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = OutPoint_clone(&a_conv);
-       LDKCVec_u8Z b_ref;
-       b_ref.datalen = (*env)->GetArrayLength(env, b);
-       b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, b, 0, b_ref.datalen, b_ref.data);
-       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       *ret_ref = C2Tuple_OutPointScriptZ_new(a_conv, b_ref);
-       return (long)ret_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NoneAPIErrorZ* orig_conv = (LDKCResult_NoneAPIErrorZ*)(orig & ~1);
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
-       LDKCVec_TransactionZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CResult_1NoneAPIErrorZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_CResult_NoneAPIErrorZZ _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");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCResult_NoneAPIErrorZ), "LDKCVec_CResult_NoneAPIErrorZZ Elements");
        else
                _res_constr.data = NULL;
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
-               LDKTransaction arr_conv_8_ref;
-               arr_conv_8_ref.datalen = (*env)->GetArrayLength(env, arr_conv_8);
-               arr_conv_8_ref.data = MALLOC(arr_conv_8_ref.datalen, "LDKTransaction Bytes");
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, arr_conv_8_ref.datalen, arr_conv_8_ref.data);
-               arr_conv_8_ref.data_is_owned = true;
-               _res_constr.data[i] = arr_conv_8_ref;
+       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
+       for (size_t w = 0; w < _res_constr.datalen; w++) {
+               int64_t _res_conv_22 = _res_vals[w];
+               LDKCResult_NoneAPIErrorZ _res_conv_22_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)_res_conv_22) & ~1);
+               FREE((void*)_res_conv_22);
+               _res_constr.data[w] = _res_conv_22_conv;
        }
-       CVec_TransactionZ_free(_res_constr);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
-       return (long)ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_u32TxOutZ _res_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_u32TxOutZ_free(_res_conv);
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_CResult_NoneAPIErrorZZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1new(JNIEnv *env, jclass clz, int32_t a, int64_t b) {
-       LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
-       FREE((void*)b);
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
-       return (long)ret_ref;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1APIErrorZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_APIErrorZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKAPIError), "LDKCVec_APIErrorZ 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];
+               LDKAPIError _res_conv_10_conv = *(LDKAPIError*)(((uint64_t)_res_conv_10) & ~1);
+               FREE((void*)_res_conv_10);
+               _res_constr.data[k] = _res_conv_10_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_APIErrorZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C2Tuple_u32TxOutZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_ChannelDetailsZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelDetails), "LDKCVec_ChannelDetailsZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t a = 0; a < _res_constr.datalen; a++) {
-               int64_t arr_conv_26 = _res_vals[a];
-               LDKC2Tuple_u32TxOutZ arr_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)arr_conv_26) & ~1);
-               FREE((void*)arr_conv_26);
-               _res_constr.data[a] = arr_conv_26_conv;
+       for (size_t q = 0; q < _res_constr.datalen; q++) {
+               int64_t _res_conv_16 = _res_vals[q];
+               LDKChannelDetails _res_conv_16_conv;
+               _res_conv_16_conv.inner = (void*)(_res_conv_16 & (~1));
+               _res_conv_16_conv.is_owned = (_res_conv_16 & 1) || (_res_conv_16 == 0);
+               _res_constr.data[q] = _res_conv_16_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
+       CVec_ChannelDetailsZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok(JNIEnv *env, jclass clz) {
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_ok();
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKPaymentSendFailure e_conv = *(LDKPaymentSendFailure*)(((uint64_t)e) & ~1);
+       FREE((void*)e);
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_NonePaymentSendFailureZ _res_conv = *(LDKCResult_NonePaymentSendFailureZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res_conv);
+       CResult_NonePaymentSendFailureZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_tArray b) {
-       LDKThirtyTwoBytes a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 32);
-       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
-       LDKCVec_C2Tuple_u32TxOutZZ b_constr;
-       b_constr.datalen = (*env)->GetArrayLength(env, b);
-       if (b_constr.datalen > 0)
-               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
-       else
-               b_constr.data = NULL;
-       int64_t* b_vals = (*env)->GetLongArrayElements (env, b, NULL);
-       for (size_t a = 0; a < b_constr.datalen; a++) {
-               int64_t arr_conv_26 = b_vals[a];
-               LDKC2Tuple_u32TxOutZ arr_conv_26_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)arr_conv_26) & ~1);
-               FREE((void*)arr_conv_26);
-               b_constr.data[a] = arr_conv_26_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, b, b_vals, 0);
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
-       return (long)ret_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NonePaymentSendFailureZ* orig_conv = (LDKCResult_NonePaymentSendFailureZ*)(orig & ~1);
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_ChannelMonitorZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelMonitor), "LDKCVec_ChannelMonitorZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t u = 0; u < _res_constr.datalen; u++) {
-               int64_t arr_conv_46 = _res_vals[u];
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ arr_conv_46_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)arr_conv_46) & ~1);
-               FREE((void*)arr_conv_46);
-               _res_constr.data[u] = arr_conv_46_conv;
+       for (size_t q = 0; q < _res_constr.datalen; q++) {
+               int64_t _res_conv_16 = _res_vals[q];
+               LDKChannelMonitor _res_conv_16_conv;
+               _res_conv_16_conv.inner = (void*)(_res_conv_16 & (~1));
+               _res_conv_16_conv.is_owned = (_res_conv_16 & 1) || (_res_conv_16 == 0);
+               _res_constr.data[q] = _res_conv_16_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_BlockHashChannelMonitorZ _res_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_BlockHashChannelMonitorZ_free(_res_conv);
+       CVec_ChannelMonitorZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
        LDKThirtyTwoBytes a_ref;
        CHECK((*env)->GetArrayLength(env, a) == 32);
        (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
-       LDKChannelMonitor b_conv;
+       LDKChannelManager b_conv;
        b_conv.inner = (void*)(b & (~1));
        b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelMonitor_clone(&b_conv);
-       LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
-       *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+       // Warning: we need a move here but no clone is available for LDKChannelManager
+       LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
        return (long)ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_BlockHashChannelManagerZ _res_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_BlockHashChannelManagerZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKC2Tuple_BlockHashChannelManagerZ o_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)o) & ~1);
        FREE((void*)o);
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKC2Tuple_u64u64Z* orig_conv = (LDKC2Tuple_u64u64Z*)(orig & ~1);
-       LDKC2Tuple_u64u64Z* ret_ref = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       *ret_ref = C2Tuple_u64u64Z_clone(orig_conv);
-       return (long)ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC2Tuple_u64u64Z _res_conv = *(LDKC2Tuple_u64u64Z*)(((uint64_t)_res) & ~1);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C2Tuple_u64u64Z_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b) {
-       LDKC2Tuple_u64u64Z* ret_ref = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       *ret_ref = C2Tuple_u64u64Z_new(a, b);
-       return (long)ret_ref;
+       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDescriptorDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
@@ -5704,23 +7970,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDes
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
-       LDKCVec_SignatureZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
-       else
-               _res_constr.data = NULL;
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
-               LDKSignature arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
-               _res_constr.data[i] = arr_conv_8_ref;
-       }
-       CVec_SignatureZ_free(_res_constr);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
        LDKC2Tuple_SignatureCVec_SignatureZZ* orig_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(orig & ~1);
        LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
@@ -5728,13 +7977,6 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1Sig
        return (long)ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_SignatureCVec_SignatureZZ _res_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_SignatureCVec_SignatureZZ_free(_res_conv);
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new(JNIEnv *env, jclass clz, int8_tArray a, jobjectArray b) {
        LDKSignature a_ref;
        CHECK((*env)->GetArrayLength(env, a) == 64);
@@ -5746,17 +7988,24 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1Sig
        else
                b_constr.data = NULL;
        for (size_t i = 0; i < b_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, b, i);
-               LDKSignature arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
-               b_constr.data[i] = arr_conv_8_ref;
+               int8_tArray b_conv_8 = (*env)->GetObjectArrayElement(env, b, i);
+               LDKSignature b_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, b_conv_8) == 64);
+               (*env)->GetByteArrayRegion(env, b_conv_8, 0, 64, b_conv_8_ref.compact_form);
+               b_constr.data[i] = b_conv_8_ref;
        }
        LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
        *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
        return (long)ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_SignatureCVec_SignatureZZ _res_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_SignatureCVec_SignatureZZ_free(_res_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
        LDKC2Tuple_SignatureCVec_SignatureZZ o_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)o) & ~1);
        FREE((void*)o);
@@ -5814,247 +8063,308 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1cl
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKChannelKeys o_conv = *(LDKChannelKeys*)(((uint64_t)o) & ~1);
-       if (o_conv.free == LDKChannelKeys_JCalls_free) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKSign o_conv = *(LDKSign*)(((uint64_t)o) & ~1);
+       if (o_conv.free == LDKSign_JCalls_free) {
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
-               LDKChannelKeys_JCalls_clone(o_conv.this_arg);
+               LDKSign_JCalls_clone(o_conv.this_arg);
        }
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_ok(o_conv);
+       LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
+       *ret_conv = CResult_SignDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_err(e_conv);
+       LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
+       *ret_conv = CResult_SignDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ChanKeySignerDecodeErrorZ _res_conv = *(LDKCResult_ChanKeySignerDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_SignDecodeErrorZ _res_conv = *(LDKCResult_SignDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ChanKeySignerDecodeErrorZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_ChanKeySignerDecodeErrorZ* orig_conv = (LDKCResult_ChanKeySignerDecodeErrorZ*)(orig & ~1);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_clone(orig_conv);
-       return (long)ret_conv;
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemoryChannelKeysDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKInMemoryChannelKeys o_conv;
-       o_conv.inner = (void*)(o & (~1));
-       o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = InMemoryChannelKeys_clone(&o_conv);
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ), "LDKCResult_InMemoryChannelKeysDecodeErrorZ");
-       *ret_conv = CResult_InMemoryChannelKeysDecodeErrorZ_ok(o_conv);
-       return (long)ret_conv;
+       CResult_SignDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemoryChannelKeysDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = (void*)(e & (~1));
-       e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ), "LDKCResult_InMemoryChannelKeysDecodeErrorZ");
-       *ret_conv = CResult_InMemoryChannelKeysDecodeErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_SignDecodeErrorZ* orig_conv = (LDKCResult_SignDecodeErrorZ*)(orig & ~1);
+       LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
+       *ret_conv = CResult_SignDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InMemoryChannelKeysDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ _res_conv = *(LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_InMemoryChannelKeysDecodeErrorZ_free(_res_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1u8ZZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+       LDKCVec_CVec_u8ZZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_u8Z), "LDKCVec_CVec_u8ZZ 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);
+               LDKCVec_u8Z _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, "LDKCVec_u8Z Bytes");
+               (*env)->GetByteArrayRegion(env, _res_conv_8, 0, _res_conv_8_ref.datalen, _res_conv_8_ref.data);
+               _res_constr.data[i] = _res_conv_8_ref;
+       }
+       CVec_CVec_u8ZZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKTxOut o_conv = *(LDKTxOut*)(((uint64_t)o) & ~1);
-       FREE((void*)o);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_ok(o_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1CVec_1u8ZZNoneZ_1ok(JNIEnv *env, jclass clz, jobjectArray o) {
+       LDKCVec_CVec_u8ZZ o_constr;
+       o_constr.datalen = (*env)->GetArrayLength(env, o);
+       if (o_constr.datalen > 0)
+               o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKCVec_u8Z), "LDKCVec_CVec_u8ZZ Elements");
+       else
+               o_constr.data = NULL;
+       for (size_t i = 0; i < o_constr.datalen; i++) {
+               int8_tArray o_conv_8 = (*env)->GetObjectArrayElement(env, o, i);
+               LDKCVec_u8Z o_conv_8_ref;
+               o_conv_8_ref.datalen = (*env)->GetArrayLength(env, o_conv_8);
+               o_conv_8_ref.data = MALLOC(o_conv_8_ref.datalen, "LDKCVec_u8Z Bytes");
+               (*env)->GetByteArrayRegion(env, o_conv_8, 0, o_conv_8_ref.datalen, o_conv_8_ref.data);
+               o_constr.data[i] = o_conv_8_ref;
+       }
+       LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+       *ret_conv = CResult_CVec_CVec_u8ZZNoneZ_ok(o_constr);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKAccessError e_conv = LDKAccessError_from_java(env, e);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1CVec_1u8ZZNoneZ_1err(JNIEnv *env, jclass clz) {
+       LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+       *ret_conv = CResult_CVec_CVec_u8ZZNoneZ_err();
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1CVec_1u8ZZNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_TxOutAccessErrorZ _res_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_CVec_CVec_u8ZZNoneZ _res_conv = *(LDKCResult_CVec_CVec_u8ZZNoneZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_TxOutAccessErrorZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_TxOutAccessErrorZ* orig_conv = (LDKCResult_TxOutAccessErrorZ*)(orig & ~1);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_clone(orig_conv);
-       return (long)ret_conv;
+       CResult_CVec_CVec_u8ZZNoneZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = CResult_NoneAPIErrorZ_ok();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1CVec_1u8ZZNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CVec_CVec_u8ZZNoneZ* orig_conv = (LDKCResult_CVec_CVec_u8ZZNoneZ*)(orig & ~1);
+       LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+       *ret_conv = CResult_CVec_CVec_u8ZZNoneZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKAPIError e_conv = *(LDKAPIError*)(((uint64_t)e) & ~1);
-       FREE((void*)e);
-       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInMemorySigner o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = InMemorySigner_clone(&o_conv);
+       LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
+       *ret_conv = CResult_InMemorySignerDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
+       *ret_conv = CResult_InMemorySignerDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_InMemorySignerDecodeErrorZ _res_conv = *(LDKCResult_InMemorySignerDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NoneAPIErrorZ_free(_res_conv);
+       CResult_InMemorySignerDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_ChannelDetailsZ _res_constr;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_InMemorySignerDecodeErrorZ* orig_conv = (LDKCResult_InMemorySignerDecodeErrorZ*)(orig & ~1);
+       LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
+       *ret_conv = CResult_InMemorySignerDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TxOutZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_TxOutZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelDetails), "LDKCVec_ChannelDetailsZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t q = 0; q < _res_constr.datalen; q++) {
-               int64_t arr_conv_16 = _res_vals[q];
-               LDKChannelDetails arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               _res_constr.data[q] = arr_conv_16_conv;
+       for (size_t h = 0; h < _res_constr.datalen; h++) {
+               int64_t _res_conv_7 = _res_vals[h];
+               LDKTxOut _res_conv_7_conv = *(LDKTxOut*)(((uint64_t)_res_conv_7) & ~1);
+               FREE((void*)_res_conv_7);
+               _res_constr.data[h] = _res_conv_7_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_ChannelDetailsZ_free(_res_constr);
+       CVec_TxOutZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_ok();
+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 (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKPaymentSendFailure e_conv;
-       e_conv.inner = (void*)(e & (~1));
-       e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PaymentSendFailure_clone(&e_conv);
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_err(e_conv);
+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 (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NonePaymentSendFailureZ _res_conv = *(LDKCResult_NonePaymentSendFailureZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NonePaymentSendFailureZ_free(_res_conv);
+       CResult_TransactionNoneZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NonePaymentSendFailureZ* orig_conv = (LDKCResult_NonePaymentSendFailureZ*)(orig & ~1);
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_clone(orig_conv);
-       return (long)ret_conv;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_NetAddressZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_RouteHopZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNetAddress), "LDKCVec_NetAddressZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
        else
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               int64_t arr_conv_12 = _res_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               _res_constr.data[m] = arr_conv_12_conv;
+       for (size_t k = 0; k < _res_constr.datalen; k++) {
+               int64_t _res_conv_10 = _res_vals[k];
+               LDKRouteHop _res_conv_10_conv;
+               _res_conv_10_conv.inner = (void*)(_res_conv_10 & (~1));
+               _res_conv_10_conv.is_owned = (_res_conv_10 & 1) || (_res_conv_10 == 0);
+               _res_constr.data[k] = _res_conv_10_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_NetAddressZ_free(_res_constr);
+       CVec_RouteHopZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_ChannelMonitorZ _res_constr;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
+       LDKCVec_CVec_RouteHopZZ _res_constr;
        _res_constr.datalen = (*env)->GetArrayLength(env, _res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelMonitor), "LDKCVec_ChannelMonitorZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_RouteHopZ), "LDKCVec_CVec_RouteHopZZ Elements");
        else
                _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t q = 0; q < _res_constr.datalen; q++) {
-               int64_t arr_conv_16 = _res_vals[q];
-               LDKChannelMonitor arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               _res_constr.data[q] = arr_conv_16_conv;
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               int64_tArray _res_conv_12 = (*env)->GetObjectArrayElement(env, _res, m);
+               LDKCVec_RouteHopZ _res_conv_12_constr;
+               _res_conv_12_constr.datalen = (*env)->GetArrayLength(env, _res_conv_12);
+               if (_res_conv_12_constr.datalen > 0)
+                       _res_conv_12_constr.data = MALLOC(_res_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+               else
+                       _res_conv_12_constr.data = NULL;
+               int64_t* _res_conv_12_vals = (*env)->GetLongArrayElements (env, _res_conv_12, NULL);
+               for (size_t k = 0; k < _res_conv_12_constr.datalen; k++) {
+                       int64_t _res_conv_12_conv_10 = _res_conv_12_vals[k];
+                       LDKRouteHop _res_conv_12_conv_10_conv;
+                       _res_conv_12_conv_10_conv.inner = (void*)(_res_conv_12_conv_10 & (~1));
+                       _res_conv_12_conv_10_conv.is_owned = (_res_conv_12_conv_10 & 1) || (_res_conv_12_conv_10 == 0);
+                       _res_conv_12_constr.data[k] = _res_conv_12_conv_10_conv;
+               }
+               (*env)->ReleaseLongArrayElements(env, _res_conv_12, _res_conv_12_vals, 0);
+               _res_constr.data[m] = _res_conv_12_constr;
        }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_ChannelMonitorZ_free(_res_constr);
+       CVec_CVec_RouteHopZZ_free(_res_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRoute o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Route_clone(&o_conv);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC2Tuple_BlockHashChannelManagerZ _res_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RouteDecodeErrorZ _res_conv = *(LDKCResult_RouteDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C2Tuple_BlockHashChannelManagerZ_free(_res_conv);
+       CResult_RouteDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1new(JNIEnv *env, jclass clz, int8_tArray a, int64_t b) {
-       LDKThirtyTwoBytes a_ref;
-       CHECK((*env)->GetArrayLength(env, a) == 32);
-       (*env)->GetByteArrayRegion(env, a, 0, 32, a_ref.data);
-       LDKChannelManager b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelManager
-       LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
-       *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
-       return (long)ret_ref;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RouteDecodeErrorZ* orig_conv = (LDKCResult_RouteDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKC2Tuple_BlockHashChannelManagerZ o_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)o) & ~1);
-       FREE((void*)o);
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
+       LDKCVec_RouteHintZ _res_constr;
+       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHint), "LDKCVec_RouteHintZ 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];
+               LDKRouteHint _res_conv_11_conv;
+               _res_conv_11_conv.inner = (void*)(_res_conv_11 & (~1));
+               _res_conv_11_conv.is_owned = (_res_conv_11 & 1) || (_res_conv_11 == 0);
+               _res_constr.data[l] = _res_conv_11_conv;
+       }
+       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
+       CVec_RouteHintZ_free(_res_constr);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRoute o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Route_clone(&o_conv);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKDecodeError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKLightningError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
+       e_conv = LightningError_clone(&e_conv);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RouteLightningErrorZ _res_conv = *(LDKCResult_RouteLightningErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res_conv);
+       CResult_RouteLightningErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RouteLightningErrorZ* orig_conv = (LDKCResult_RouteLightningErrorZ*)(orig & ~1);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1ok(JNIEnv *env, jclass clz, int64_t o) {
@@ -6110,20 +8420,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8
        CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_u64Z _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(int64_t), "LDKCVec_u64Z Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t g = 0; g < _res_constr.datalen; g++) {
-               int64_t arr_conv_6 = _res_vals[g];
-               _res_constr.data[g] = arr_conv_6;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_u64Z_free(_res_constr);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* orig_conv = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ), "LDKCResult_CResult_NetAddressu8ZDecodeErrorZ");
+       *ret_conv = CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
@@ -6135,11 +8436,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free(JNI
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
        for (size_t p = 0; p < _res_constr.datalen; p++) {
-               int64_t arr_conv_15 = _res_vals[p];
-               LDKUpdateAddHTLC arr_conv_15_conv;
-               arr_conv_15_conv.inner = (void*)(arr_conv_15 & (~1));
-               arr_conv_15_conv.is_owned = (arr_conv_15 & 1) || (arr_conv_15 == 0);
-               _res_constr.data[p] = arr_conv_15_conv;
+               int64_t _res_conv_15 = _res_vals[p];
+               LDKUpdateAddHTLC _res_conv_15_conv;
+               _res_conv_15_conv.inner = (void*)(_res_conv_15 & (~1));
+               _res_conv_15_conv.is_owned = (_res_conv_15 & 1) || (_res_conv_15 == 0);
+               _res_constr.data[p] = _res_conv_15_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_UpdateAddHTLCZ_free(_res_constr);
@@ -6154,11 +8455,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
        for (size_t t = 0; t < _res_constr.datalen; t++) {
-               int64_t arr_conv_19 = _res_vals[t];
-               LDKUpdateFulfillHTLC arr_conv_19_conv;
-               arr_conv_19_conv.inner = (void*)(arr_conv_19 & (~1));
-               arr_conv_19_conv.is_owned = (arr_conv_19 & 1) || (arr_conv_19 == 0);
-               _res_constr.data[t] = arr_conv_19_conv;
+               int64_t _res_conv_19 = _res_vals[t];
+               LDKUpdateFulfillHTLC _res_conv_19_conv;
+               _res_conv_19_conv.inner = (void*)(_res_conv_19 & (~1));
+               _res_conv_19_conv.is_owned = (_res_conv_19 & 1) || (_res_conv_19 == 0);
+               _res_constr.data[t] = _res_conv_19_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_UpdateFulfillHTLCZ_free(_res_constr);
@@ -6173,11 +8474,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free(JN
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
        for (size_t q = 0; q < _res_constr.datalen; q++) {
-               int64_t arr_conv_16 = _res_vals[q];
-               LDKUpdateFailHTLC arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               _res_constr.data[q] = arr_conv_16_conv;
+               int64_t _res_conv_16 = _res_vals[q];
+               LDKUpdateFailHTLC _res_conv_16_conv;
+               _res_conv_16_conv.inner = (void*)(_res_conv_16 & (~1));
+               _res_conv_16_conv.is_owned = (_res_conv_16 & 1) || (_res_conv_16 == 0);
+               _res_constr.data[q] = _res_conv_16_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_UpdateFailHTLCZ_free(_res_constr);
@@ -6192,135 +8493,81 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ
                _res_constr.data = NULL;
        int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
        for (size_t z = 0; z < _res_constr.datalen; z++) {
-               int64_t arr_conv_25 = _res_vals[z];
-               LDKUpdateFailMalformedHTLC arr_conv_25_conv;
-               arr_conv_25_conv.inner = (void*)(arr_conv_25 & (~1));
-               arr_conv_25_conv.is_owned = (arr_conv_25 & 1) || (arr_conv_25 == 0);
-               _res_constr.data[z] = arr_conv_25_conv;
+               int64_t _res_conv_25 = _res_vals[z];
+               LDKUpdateFailMalformedHTLC _res_conv_25_conv;
+               _res_conv_25_conv.inner = (void*)(_res_conv_25 & (~1));
+               _res_conv_25_conv.is_owned = (_res_conv_25 & 1) || (_res_conv_25 == 0);
+               _res_constr.data[z] = _res_conv_25_conv;
        }
        (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
        CVec_UpdateFailMalformedHTLCZ_free(_res_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok(JNIEnv *env, jclass clz, jboolean o) {
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_ok(o);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKAcceptChannel o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = AcceptChannel_clone(&o_conv);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKLightningError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_boolLightningErrorZ _res_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_AcceptChannelDecodeErrorZ _res_conv = *(LDKCResult_AcceptChannelDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_boolLightningErrorZ_free(_res_conv);
+       CResult_AcceptChannelDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_boolLightningErrorZ* orig_conv = (LDKCResult_boolLightningErrorZ*)(orig & ~1);
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_AcceptChannelDecodeErrorZ* orig_conv = (LDKCResult_AcceptChannelDecodeErrorZ*)(orig & ~1);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new(JNIEnv *env, jclass clz, int64_t a, int64_t b, int64_t c) {
-       LDKChannelAnnouncement a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = ChannelAnnouncement_clone(&a_conv);
-       LDKChannelUpdate b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelUpdate_clone(&b_conv);
-       LDKChannelUpdate c_conv;
-       c_conv.inner = (void*)(c & (~1));
-       c_conv.is_owned = (c & 1) || (c == 0);
-       c_conv = ChannelUpdate_clone(&c_conv);
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
-       return (long)ret_ref;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ 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 arr_conv_63 = _res_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
-               FREE((void*)arr_conv_63);
-               _res_constr.data[l] = arr_conv_63_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_NodeAnnouncementZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (*env)->GetLongArrayElements (env, _res, NULL);
-       for (size_t s = 0; s < _res_constr.datalen; s++) {
-               int64_t arr_conv_18 = _res_vals[s];
-               LDKNodeAnnouncement arr_conv_18_conv;
-               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
-               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
-               _res_constr.data[s] = arr_conv_18_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_NodeAnnouncementZ_free(_res_constr);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_ok();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKAnnouncementSignatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = AnnouncementSignatures_clone(&o_conv);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKLightningError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NoneLightningErrorZ _res_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_NoneLightningErrorZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NoneLightningErrorZ* orig_conv = (LDKCResult_NoneLightningErrorZ*)(orig & ~1);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_clone(orig_conv);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ _res_conv = *(LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_AnnouncementSignaturesDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* orig_conv = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(orig & ~1);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
@@ -6351,822 +8598,963 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDec
        CResult_ChannelReestablishDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKInit o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelReestablishDecodeErrorZ* orig_conv = (LDKCResult_ChannelReestablishDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
+       *ret_conv = CResult_ChannelReestablishDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKClosingSigned o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Init_clone(&o_conv);
-       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
-       *ret_conv = CResult_InitDecodeErrorZ_ok(o_conv);
+       o_conv = ClosingSigned_clone(&o_conv);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
-       *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_InitDecodeErrorZ _res_conv = *(LDKCResult_InitDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ClosingSignedDecodeErrorZ _res_conv = *(LDKCResult_ClosingSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_InitDecodeErrorZ_free(_res_conv);
+       CResult_ClosingSignedDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKPing o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ClosingSignedDecodeErrorZ* orig_conv = (LDKCResult_ClosingSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKCommitmentSigned o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Ping_clone(&o_conv);
-       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
-       *ret_conv = CResult_PingDecodeErrorZ_ok(o_conv);
+       o_conv = CommitmentSigned_clone(&o_conv);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
-       *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PingDecodeErrorZ _res_conv = *(LDKCResult_PingDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_CommitmentSignedDecodeErrorZ _res_conv = *(LDKCResult_CommitmentSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PingDecodeErrorZ_free(_res_conv);
+       CResult_CommitmentSignedDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKPong o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_CommitmentSignedDecodeErrorZ* orig_conv = (LDKCResult_CommitmentSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKFundingCreated o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Pong_clone(&o_conv);
-       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
-       *ret_conv = CResult_PongDecodeErrorZ_ok(o_conv);
+       o_conv = FundingCreated_clone(&o_conv);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
-       *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PongDecodeErrorZ _res_conv = *(LDKCResult_PongDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingCreatedDecodeErrorZ _res_conv = *(LDKCResult_FundingCreatedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PongDecodeErrorZ_free(_res_conv);
+       CResult_FundingCreatedDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKUnsignedChannelAnnouncement o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_FundingCreatedDecodeErrorZ* orig_conv = (LDKCResult_FundingCreatedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKFundingSigned o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedChannelAnnouncement_clone(&o_conv);
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o_conv);
+       o_conv = FundingSigned_clone(&o_conv);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingSignedDecodeErrorZ _res_conv = *(LDKCResult_FundingSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res_conv);
+       CResult_FundingSignedDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKUnsignedChannelUpdate o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_FundingSignedDecodeErrorZ* orig_conv = (LDKCResult_FundingSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKFundingLocked o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedChannelUpdate_clone(&o_conv);
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o_conv);
+       o_conv = FundingLocked_clone(&o_conv);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingLockedDecodeErrorZ _res_conv = *(LDKCResult_FundingLockedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res_conv);
+       CResult_FundingLockedDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKErrorMessage o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_FundingLockedDecodeErrorZ* orig_conv = (LDKCResult_FundingLockedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKInit o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ErrorMessage_clone(&o_conv);
-       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
-       *ret_conv = CResult_ErrorMessageDecodeErrorZ_ok(o_conv);
+       o_conv = Init_clone(&o_conv);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
-       *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ErrorMessageDecodeErrorZ _res_conv = *(LDKCResult_ErrorMessageDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_InitDecodeErrorZ _res_conv = *(LDKCResult_InitDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ErrorMessageDecodeErrorZ_free(_res_conv);
+       CResult_InitDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKUnsignedNodeAnnouncement o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_InitDecodeErrorZ* orig_conv = (LDKCResult_InitDecodeErrorZ*)(orig & ~1);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKOpenChannel o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedNodeAnnouncement_clone(&o_conv);
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o_conv);
+       o_conv = OpenChannel_clone(&o_conv);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_OpenChannelDecodeErrorZ _res_conv = *(LDKCResult_OpenChannelDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res_conv);
+       CResult_OpenChannelDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKQueryShortChannelIds o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_OpenChannelDecodeErrorZ* orig_conv = (LDKCResult_OpenChannelDecodeErrorZ*)(orig & ~1);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKRevokeAndACK o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = QueryShortChannelIds_clone(&o_conv);
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
-       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_ok(o_conv);
+       o_conv = RevokeAndACK_clone(&o_conv);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
-       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ _res_conv = *(LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RevokeAndACKDecodeErrorZ _res_conv = *(LDKCResult_RevokeAndACKDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_QueryShortChannelIdsDecodeErrorZ_free(_res_conv);
+       CResult_RevokeAndACKDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKReplyShortChannelIdsEnd o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_RevokeAndACKDecodeErrorZ* orig_conv = (LDKCResult_RevokeAndACKDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKShutdown o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ReplyShortChannelIdsEnd_clone(&o_conv);
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
-       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o_conv);
+       o_conv = Shutdown_clone(&o_conv);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
-       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res_conv = *(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ShutdownDecodeErrorZ _res_conv = *(LDKCResult_ShutdownDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res_conv);
+       CResult_ShutdownDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKQueryChannelRange o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ShutdownDecodeErrorZ* orig_conv = (LDKCResult_ShutdownDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUpdateFailHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = QueryChannelRange_clone(&o_conv);
-       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFailHTLC_clone(&o_conv);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_QueryChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_QueryChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFailHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_QueryChannelRangeDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFailHTLCDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKReplyChannelRange o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUpdateFailMalformedHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ReplyChannelRange_clone(&o_conv);
-       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFailMalformedHTLC_clone(&o_conv);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ReplyChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_ReplyChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ReplyChannelRangeDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKGossipTimestampFilter o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUpdateFee o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = GossipTimestampFilter_clone(&o_conv);
-       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
-       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFee_clone(&o_conv);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
-       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_GossipTimestampFilterDecodeErrorZ _res_conv = *(LDKCResult_GossipTimestampFilterDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFeeDecodeErrorZ _res_conv = *(LDKCResult_UpdateFeeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_GossipTimestampFilterDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFeeDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
-       LDKCVec_PublicKeyZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
-       else
-               _res_constr.data = NULL;
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, _res, i);
-               LDKPublicKey arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 33);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 33, arr_conv_8_ref.compressed_form);
-               _res_constr.data[i] = arr_conv_8_ref;
-       }
-       CVec_PublicKeyZ_free(_res_constr);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UpdateFeeDecodeErrorZ* orig_conv = (LDKCResult_UpdateFeeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-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_1UpdateFulfillHTLCDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUpdateFulfillHTLC o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UpdateFulfillHTLC_clone(&o_conv);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKCVec_u8Z o_ref;
-       o_ref.datalen = (*env)->GetArrayLength(env, o);
-       o_ref.data = MALLOC(o_ref.datalen, "LDKCVec_u8Z Bytes");
-       (*env)->GetByteArrayRegion(env, o, 0, o_ref.datalen, o_ref.data);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_ok(o_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKPeerHandleError e_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUpdateAddHTLC o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UpdateAddHTLC_clone(&o_conv);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_UpdateAddHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateAddHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_UpdateAddHTLCDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKPing o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Ping_clone(&o_conv);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_CVec_u8ZPeerHandleErrorZ _res_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_PingDecodeErrorZ _res_conv = *(LDKCResult_PingDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_CVec_u8ZPeerHandleErrorZ_free(_res_conv);
+       CResult_PingDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* orig_conv = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PingDecodeErrorZ* orig_conv = (LDKCResult_PingDecodeErrorZ*)(orig & ~1);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok(JNIEnv *env, jclass clz) {
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_ok();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKPong o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Pong_clone(&o_conv);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKPeerHandleError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NonePeerHandleErrorZ _res_conv = *(LDKCResult_NonePeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_PongDecodeErrorZ _res_conv = *(LDKCResult_PongDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NonePeerHandleErrorZ_free(_res_conv);
+       CResult_PongDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NonePeerHandleErrorZ* orig_conv = (LDKCResult_NonePeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_PongDecodeErrorZ* orig_conv = (LDKCResult_PongDecodeErrorZ*)(orig & ~1);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok(JNIEnv *env, jclass clz, jboolean o) {
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_ok(o);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnsignedChannelAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedChannelAnnouncement_clone(&o_conv);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKPeerHandleError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_boolPeerHandleErrorZ _res_conv = *(LDKCResult_boolPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_boolPeerHandleErrorZ_free(_res_conv);
+       CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_boolPeerHandleErrorZ* orig_conv = (LDKCResult_boolPeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1ok(JNIEnv *env, jclass clz, int8_tArray o) {
-       LDKSecretKey o_ref;
-       CHECK((*env)->GetArrayLength(env, o) == 32);
-       (*env)->GetByteArrayRegion(env, o, 0, 32, o_ref.bytes);
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
-       *ret_conv = CResult_SecretKeySecpErrorZ_ok(o_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelAnnouncement_clone(&o_conv);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
-       *ret_conv = CResult_SecretKeySecpErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_SecretKeySecpErrorZ _res_conv = *(LDKCResult_SecretKeySecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_ChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_SecretKeySecpErrorZ_free(_res_conv);
+       CResult_ChannelAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_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_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
-       *ret_conv = CResult_PublicKeySecpErrorZ_ok(o_ref);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
-       *ret_conv = CResult_PublicKeySecpErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnsignedChannelUpdate o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedChannelUpdate_clone(&o_conv);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PublicKeySecpErrorZ _res_conv = *(LDKCResult_PublicKeySecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PublicKeySecpErrorZ_free(_res_conv);
+       CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKTxCreationKeys o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* orig_conv = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKChannelUpdate o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = TxCreationKeys_clone(&o_conv);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
-       *ret_conv = CResult_TxCreationKeysSecpErrorZ_ok(o_conv);
+       o_conv = ChannelUpdate_clone(&o_conv);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1err(JNIEnv *env, jclass clz, jclass e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_java(env, e);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
-       *ret_conv = CResult_TxCreationKeysSecpErrorZ_err(e_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_TxCreationKeysSecpErrorZ _res_conv = *(LDKCResult_TxCreationKeysSecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_ChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_TxCreationKeysSecpErrorZ_free(_res_conv);
+       CResult_ChannelUpdateDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKTrustedCommitmentTransaction o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ChannelUpdateDecodeErrorZ* orig_conv = (LDKCResult_ChannelUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKErrorMessage o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       // Warning: we need a move here but no clone is available for LDKTrustedCommitmentTransaction
-       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
-       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_ok(o_conv);
+       o_conv = ErrorMessage_clone(&o_conv);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1err(JNIEnv *env, jclass clz) {
-       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
-       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_err();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_TrustedCommitmentTransactionNoneZ _res_conv = *(LDKCResult_TrustedCommitmentTransactionNoneZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ErrorMessageDecodeErrorZ _res_conv = *(LDKCResult_ErrorMessageDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_TrustedCommitmentTransactionNoneZ_free(_res_conv);
+       CResult_ErrorMessageDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok(JNIEnv *env, jclass clz, jobjectArray o) {
-       LDKCVec_SignatureZ o_constr;
-       o_constr.datalen = (*env)->GetArrayLength(env, o);
-       if (o_constr.datalen > 0)
-               o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
-       else
-               o_constr.data = NULL;
-       for (size_t i = 0; i < o_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, o, i);
-               LDKSignature arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
-               o_constr.data[i] = arr_conv_8_ref;
-       }
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_ok(o_constr);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ErrorMessageDecodeErrorZ* orig_conv = (LDKCResult_ErrorMessageDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err(JNIEnv *env, jclass clz) {
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_err();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKUnsignedNodeAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedNodeAnnouncement_clone(&o_conv);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_CVec_SignatureZNoneZ _res_conv = *(LDKCResult_CVec_SignatureZNoneZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_CVec_SignatureZNoneZ_free(_res_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_CVec_SignatureZNoneZ* orig_conv = (LDKCResult_CVec_SignatureZNoneZ*)(orig & ~1);
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_RouteHopZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ 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 arr_conv_10 = _res_vals[k];
-               LDKRouteHop arr_conv_10_conv;
-               arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-               arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-               _res_constr.data[k] = arr_conv_10_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_RouteHopZ_free(_res_constr);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free(JNIEnv *env, jclass clz, jobjectArray _res) {
-       LDKCVec_CVec_RouteHopZZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_RouteHopZ), "LDKCVec_CVec_RouteHopZZ Elements");
-       else
-               _res_constr.data = NULL;
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               int64_tArray arr_conv_12 = (*env)->GetObjectArrayElement(env, _res, m);
-               LDKCVec_RouteHopZ arr_conv_12_constr;
-               arr_conv_12_constr.datalen = (*env)->GetArrayLength(env, arr_conv_12);
-               if (arr_conv_12_constr.datalen > 0)
-                       arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
-               else
-                       arr_conv_12_constr.data = NULL;
-               int64_t* arr_conv_12_vals = (*env)->GetLongArrayElements (env, arr_conv_12, NULL);
-               for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
-                       int64_t arr_conv_10 = arr_conv_12_vals[k];
-                       LDKRouteHop arr_conv_10_conv;
-                       arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-                       arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-                       arr_conv_12_constr.data[k] = arr_conv_10_conv;
-               }
-               (*env)->ReleaseLongArrayElements(env, arr_conv_12, arr_conv_12_vals, 0);
-               _res_constr.data[m] = arr_conv_12_constr;
-       }
-       CVec_CVec_RouteHopZZ_free(_res_constr);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKRoute o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKNodeAnnouncement o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Route_clone(&o_conv);
-       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
-       *ret_conv = CResult_RouteDecodeErrorZ_ok(o_conv);
+       o_conv = NodeAnnouncement_clone(&o_conv);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
-       *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RouteDecodeErrorZ _res_conv = *(LDKCResult_RouteDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_NodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RouteDecodeErrorZ_free(_res_conv);
+       CResult_NodeAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free(JNIEnv *env, jclass clz, int64_tArray _res) {
-       LDKCVec_RouteHintZ _res_constr;
-       _res_constr.datalen = (*env)->GetArrayLength(env, _res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHint), "LDKCVec_RouteHintZ 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 arr_conv_11 = _res_vals[l];
-               LDKRouteHint arr_conv_11_conv;
-               arr_conv_11_conv.inner = (void*)(arr_conv_11 & (~1));
-               arr_conv_11_conv.is_owned = (arr_conv_11 & 1) || (arr_conv_11 == 0);
-               _res_constr.data[l] = arr_conv_11_conv;
-       }
-       (*env)->ReleaseLongArrayElements(env, _res, _res_vals, 0);
-       CVec_RouteHintZ_free(_res_constr);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKRoute o_conv;
-       o_conv.inner = (void*)(o & (~1));
-       o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Route_clone(&o_conv);
-       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
-       *ret_conv = CResult_RouteLightningErrorZ_ok(o_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKQueryShortChannelIds o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = QueryShortChannelIds_clone(&o_conv);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
-       LDKLightningError e_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
-       *ret_conv = CResult_RouteLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RouteLightningErrorZ _res_conv = *(LDKCResult_RouteLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ _res_conv = *(LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RouteLightningErrorZ_free(_res_conv);
+       CResult_QueryShortChannelIdsDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKRoutingFees o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* orig_conv = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(orig & ~1);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKReplyShortChannelIdsEnd o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = RoutingFees_clone(&o_conv);
-       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
-       *ret_conv = CResult_RoutingFeesDecodeErrorZ_ok(o_conv);
+       o_conv = ReplyShortChannelIdsEnd_clone(&o_conv);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
-       *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RoutingFeesDecodeErrorZ _res_conv = *(LDKCResult_RoutingFeesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res_conv = *(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RoutingFeesDecodeErrorZ_free(_res_conv);
+       CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKNodeAnnouncementInfo o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* orig_conv = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKQueryChannelRange o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = NodeAnnouncementInfo_clone(&o_conv);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o_conv);
+       o_conv = QueryChannelRange_clone(&o_conv);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_QueryChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_QueryChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res_conv);
+       CResult_QueryChannelRangeDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(orig & ~1);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ* orig_conv = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKNodeInfo o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKReplyChannelRange o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = NodeInfo_clone(&o_conv);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_ok(o_conv);
+       o_conv = ReplyChannelRange_clone(&o_conv);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NodeInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_ReplyChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NodeInfoDecodeErrorZ_free(_res_conv);
+       CResult_ReplyChannelRangeDecodeErrorZ_free(_res_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCResult_NodeInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeInfoDecodeErrorZ*)(orig & ~1);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* orig_conv = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
-       LDKNetworkGraph o_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1ok(JNIEnv *env, jclass clz, int64_t o) {
+       LDKGossipTimestampFilter o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       // Warning: we need a move here but no clone is available for LDKNetworkGraph
-       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
-       *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
+       o_conv = GossipTimestampFilter_clone(&o_conv);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1err(JNIEnv *env, jclass clz, int64_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
-       *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1free(JNIEnv *env, jclass clz, int64_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NetworkGraphDecodeErrorZ _res_conv = *(LDKCResult_NetworkGraphDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ _res_conv = *(LDKCResult_GossipTimestampFilterDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
+       CResult_GossipTimestampFilterDecodeErrorZ_free(_res_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* orig_conv = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(orig & ~1);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Event_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -7186,11 +9574,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Event_1clone(JNIEnv *env, j
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Event_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKEvent* obj_conv = (LDKEvent*)obj;
-       LDKCVec_u8Z arg_var = Event_write(obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Event_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 void JNICALL Java_org_ldk_impl_bindings_MessageSendEvent_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -7262,20 +9650,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1free(J
        ChannelHandshakeConfig_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelHandshakeConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1get_1minimum_1depth(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelHandshakeConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7332,8 +9706,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1new
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1default(JNIEnv *env, jclass clz) {
-       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_default();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelHandshakeConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7343,18 +9720,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1def
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelHandshakeLimits this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelHandshakeLimits_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelHandshakeLimits orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_clone(&orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1default(JNIEnv *env, jclass clz) {
+       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7364,6 +9731,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1clo
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelHandshakeLimits this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelHandshakeLimits_free(this_ptr_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1get_1min_1funding_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelHandshakeLimits this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7525,8 +9899,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1new
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1default(JNIEnv *env, jclass clz) {
-       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_default();
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelHandshakeLimits orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7536,18 +9913,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1def
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelConfig this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelConfig_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelConfig ret_var = ChannelConfig_clone(&orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1default(JNIEnv *env, jclass clz) {
+       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7557,6 +9924,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelConfig this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelConfig_free(this_ptr_conv);
+}
+
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1get_1fee_1proportional_1millionths(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7613,6 +9987,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1new(JNIEnv *
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelConfig ret_var = ChannelConfig_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1default(JNIEnv *env, jclass clz) {
        LDKChannelConfig ret_var = ChannelConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -7628,26 +10016,21 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1write(JN
        LDKChannelConfig obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelConfig_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelConfig_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_ChannelConfig_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);
-       LDKChannelConfig ret_var = ChannelConfig_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = ChannelConfig_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -7657,20 +10040,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free(JNIEnv *env,
        UserConfig_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UserConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUserConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKUserConfig ret_var = UserConfig_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UserConfig_1get_1own_1channel_1config(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUserConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7769,6 +10138,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UserConfig_1new(JNIEnv *env
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UserConfig_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUserConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKUserConfig ret_var = UserConfig_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UserConfig_1default(JNIEnv *env, jclass clz) {
        LDKUserConfig ret_var = UserConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -7793,6 +10176,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Access_1free(JNIEnv *env, jcla
        Access_free(this_ptr_conv);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if ((this_ptr & 1) != 0) return;
+       LDKListen this_ptr_conv = *(LDKListen*)(((uint64_t)this_ptr) & ~1);
+       FREE((void*)this_ptr);
+       Listen_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Watch_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKWatch this_ptr_conv = *(LDKWatch*)(((uint64_t)this_ptr) & ~1);
@@ -7850,10 +10240,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1block_1connected
                txdata_constr.data = NULL;
        int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
        for (size_t y = 0; y < txdata_constr.datalen; y++) {
-               int64_t arr_conv_24 = txdata_vals[y];
-               LDKC2Tuple_usizeTransactionZ arr_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_conv_24) & ~1);
-               FREE((void*)arr_conv_24);
-               txdata_constr.data[y] = arr_conv_24_conv;
+               int64_t txdata_conv_24 = txdata_vals[y];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
+               FREE((void*)txdata_conv_24);
+               txdata_constr.data[y] = txdata_conv_24_conv;
        }
        (*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
        ChainMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height);
@@ -7927,20 +10317,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free(JNI
        ChannelMonitorUpdate_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelMonitorUpdate orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1get_1update_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelMonitorUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7956,15 +10332,29 @@ 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_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelMonitorUpdate orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelMonitorUpdate obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelMonitorUpdate_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelMonitorUpdate_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_ChannelMonitorUpdate_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -8005,23 +10395,17 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorUpdateError_1clone(J
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKMonitorEvent this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       if ((this_ptr & 1) != 0) return;
+       LDKMonitorEvent this_ptr_conv = *(LDKMonitorEvent*)(((uint64_t)this_ptr) & ~1);
+       FREE((void*)this_ptr);
        MonitorEvent_free(this_ptr_conv);
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_MonitorEvent_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKMonitorEvent orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKMonitorEvent ret_var = MonitorEvent_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKMonitorEvent* orig_conv = (LDKMonitorEvent*)orig;
+       LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
+       *ret_copy = MonitorEvent_clone(orig_conv);
+       long ret_ref = (long)ret_copy;
        return ret_ref;
 }
 
@@ -8050,26 +10434,21 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1write(JNIEn
        LDKHTLCUpdate obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = HTLCUpdate_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = HTLCUpdate_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_HTLCUpdate_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);
-       LDKHTLCUpdate ret_var = HTLCUpdate_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = HTLCUpdate_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -8097,11 +10476,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1write(J
        LDKChannelMonitor obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelMonitor_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelMonitor_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_ChannelMonitor_1update_1monitor(JNIEnv *env, jclass clz, int64_t this_arg, int64_t updates, int64_t broadcaster, int64_t fee_estimator, int64_t logger) {
@@ -8144,14 +10523,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1a
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
        for (size_t o = 0; o < ret_var.datalen; o++) {
-               LDKMonitorEvent arr_conv_14_var = ret_var.data[o];
-               CHECK((((long)arr_conv_14_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_14_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_14_ref = (long)arr_conv_14_var.inner;
-               if (arr_conv_14_var.is_owned) {
-                       arr_conv_14_ref |= 1;
-               }
-               ret_arr_ptr[o] = arr_conv_14_ref;
+               LDKMonitorEvent *ret_conv_14_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
+               *ret_conv_14_copy = MonitorEvent_clone(&ret_var.data[o]);
+               long ret_conv_14_ref = (long)ret_conv_14_copy;
+               ret_arr_ptr[o] = ret_conv_14_ref;
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -8166,10 +10541,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1a
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
        for (size_t h = 0; h < ret_var.datalen; h++) {
-               LDKEvent *arr_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-               *arr_conv_7_copy = Event_clone(&ret_var.data[h]);
-               long arr_conv_7_ref = (long)arr_conv_7_copy;
-               ret_arr_ptr[h] = arr_conv_7_ref;
+               LDKEvent *ret_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
+               *ret_conv_7_copy = Event_clone(&ret_var.data[h]);
+               long ret_conv_7_ref = (long)ret_conv_7_copy;
+               ret_arr_ptr[h] = ret_conv_7_ref;
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -8185,11 +10560,11 @@ JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1l
        jobjectArray ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
        ;
        for (size_t i = 0; i < ret_var.datalen; i++) {
-               LDKTransaction arr_conv_8_var = ret_var.data[i];
-               int8_tArray arr_conv_8_arr = (*env)->NewByteArray(env, arr_conv_8_var.datalen);
-               (*env)->SetByteArrayRegion(env, arr_conv_8_arr, 0, arr_conv_8_var.datalen, arr_conv_8_var.data);
-               Transaction_free(arr_conv_8_var);
-               (*env)->SetObjectArrayElement(env, ret_arr, i, arr_conv_8_arr);
+               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;
@@ -8211,10 +10586,10 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_
                txdata_constr.data = NULL;
        int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
        for (size_t y = 0; y < txdata_constr.datalen; y++) {
-               int64_t arr_conv_24 = txdata_vals[y];
-               LDKC2Tuple_usizeTransactionZ arr_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_conv_24) & ~1);
-               FREE((void*)arr_conv_24);
-               txdata_constr.data[y] = arr_conv_24_conv;
+               int64_t txdata_conv_24 = txdata_vals[y];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
+               FREE((void*)txdata_conv_24);
+               txdata_constr.data[y] = txdata_conv_24_conv;
        }
        (*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
        LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
@@ -8236,9 +10611,9 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
        for (size_t u = 0; u < ret_var.datalen; u++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* arr_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *arr_conv_46_ref = ret_var.data[u];
-               ret_arr_ptr[u] = (long)arr_conv_46_ref;
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_46_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_46_ref = ret_var.data[u];
+               ret_arr_ptr[u] = (long)ret_conv_46_ref;
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -8296,20 +10671,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free(JNIEnv *env, jc
        OutPoint_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKOutPoint orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKOutPoint ret_var = OutPoint_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKOutPoint this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8358,38 +10719,324 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1new(JNIEnv *env,
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OutPoint_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOutPoint orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKOutPoint ret_var = OutPoint_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 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 = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 32, OutPoint_to_channel_id(&this_arg_conv).data);
-       return arg_arr;
+       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 = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = OutPoint_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = OutPoint_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_OutPoint_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);
-       LDKOutPoint ret_var = OutPoint_read(ser_ref);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = OutPoint_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return (long)ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       DelayedPaymentOutputDescriptor_free(this_ptr_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1outpoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint ret_var = DelayedPaymentOutputDescriptor_get_outpoint(&this_ptr_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1outpoint(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint val_conv;
+       val_conv.inner = (void*)(val & (~1));
+       val_conv.is_owned = (val & 1) || (val == 0);
+       val_conv = OutPoint_clone(&val_conv);
+       DelayedPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, DelayedPaymentOutputDescriptor_get_per_commitment_point(&this_ptr_conv).compressed_form);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       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);
+       DelayedPaymentOutputDescriptor_set_per_commitment_point(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int16_t ret_val = DelayedPaymentOutputDescriptor_get_to_self_delay(&this_ptr_conv);
+       return ret_val;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1to_1self_1delay(JNIEnv *env, jclass clz, int64_t this_ptr, int16_t val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       DelayedPaymentOutputDescriptor_set_to_self_delay(&this_ptr_conv, val);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1output(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKTxOut val_conv = *(LDKTxOut*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       DelayedPaymentOutputDescriptor_set_output(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1revocation_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, DelayedPaymentOutputDescriptor_get_revocation_pubkey(&this_ptr_conv).compressed_form);
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1revocation_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       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);
+       DelayedPaymentOutputDescriptor_set_revocation_pubkey(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1keys_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *DelayedPaymentOutputDescriptor_get_channel_keys_id(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1keys_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       DelayedPaymentOutputDescriptor_set_channel_keys_id(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1value_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int64_t ret_val = DelayedPaymentOutputDescriptor_get_channel_value_satoshis(&this_ptr_conv);
+       return ret_val;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1value_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       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, int8_tArray revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) {
+       LDKOutPoint outpoint_arg_conv;
+       outpoint_arg_conv.inner = (void*)(outpoint_arg & (~1));
+       outpoint_arg_conv.is_owned = (outpoint_arg & 1) || (outpoint_arg == 0);
+       outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
+       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);
+       LDKTxOut output_arg_conv = *(LDKTxOut*)(((uint64_t)output_arg) & ~1);
+       FREE((void*)output_arg);
+       LDKPublicKey revocation_pubkey_arg_ref;
+       CHECK((*env)->GetArrayLength(env, revocation_pubkey_arg) == 33);
+       (*env)->GetByteArrayRegion(env, revocation_pubkey_arg, 0, 33, revocation_pubkey_arg_ref.compressed_form);
+       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_ref, channel_keys_id_arg_ref, channel_value_satoshis_arg);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKDelayedPaymentOutputDescriptor orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       StaticPaymentOutputDescriptor_free(this_ptr_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1get_1outpoint(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint ret_var = StaticPaymentOutputDescriptor_get_outpoint(&this_ptr_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1outpoint(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint val_conv;
+       val_conv.inner = (void*)(val & (~1));
+       val_conv.is_owned = (val & 1) || (val == 0);
+       val_conv = OutPoint_clone(&val_conv);
+       StaticPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1output(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKTxOut val_conv = *(LDKTxOut*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       StaticPaymentOutputDescriptor_set_output(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1get_1channel_1keys_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *StaticPaymentOutputDescriptor_get_channel_keys_id(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1channel_1keys_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       StaticPaymentOutputDescriptor_set_channel_keys_id(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1get_1channel_1value_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int64_t ret_val = StaticPaymentOutputDescriptor_get_channel_value_satoshis(&this_ptr_conv);
+       return ret_val;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1channel_1value_1satoshis(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       StaticPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1new(JNIEnv *env, jclass clz, int64_t outpoint_arg, int64_t output_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) {
+       LDKOutPoint outpoint_arg_conv;
+       outpoint_arg_conv.inner = (void*)(outpoint_arg & (~1));
+       outpoint_arg_conv.is_owned = (outpoint_arg & 1) || (outpoint_arg == 0);
+       outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
+       LDKTxOut output_arg_conv = *(LDKTxOut*)(((uint64_t)output_arg) & ~1);
+       FREE((void*)output_arg);
+       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);
+       LDKStaticPaymentOutputDescriptor ret_var = StaticPaymentOutputDescriptor_new(outpoint_arg_conv, output_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKStaticPaymentOutputDescriptor orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKStaticPaymentOutputDescriptor ret_var = StaticPaymentOutputDescriptor_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
        if (ret_var.is_owned) {
                ret_ref |= 1;
        }
-       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
        return ret_ref;
 }
 
@@ -8410,11 +11057,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKSpendableOutputDescriptor* obj_conv = (LDKSpendableOutputDescriptor*)obj;
-       LDKCVec_u8Z arg_var = SpendableOutputDescriptor_write(obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = SpendableOutputDescriptor_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_SpendableOutputDescriptor_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -8427,18 +11074,18 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1
        return (long)ret_conv;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelKeys* orig_conv = (LDKChannelKeys*)orig;
-       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *ret = ChannelKeys_clone(orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Sign_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKSign* orig_conv = (LDKSign*)orig;
+       LDKSign* ret = MALLOC(sizeof(LDKSign), "LDKSign");
+       *ret = Sign_clone(orig_conv);
        return (long)ret;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Sign_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
-       LDKChannelKeys this_ptr_conv = *(LDKChannelKeys*)(((uint64_t)this_ptr) & ~1);
+       LDKSign this_ptr_conv = *(LDKSign*)(((uint64_t)this_ptr) & ~1);
        FREE((void*)this_ptr);
-       ChannelKeys_free(this_ptr_conv);
+       Sign_free(this_ptr_conv);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysInterface_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -8448,142 +11095,142 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysInterface_1free(JNIEnv *en
        KeysInterface_free(this_ptr_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       InMemoryChannelKeys_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKInMemoryChannelKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKInMemoryChannelKeys ret_var = InMemoryChannelKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       InMemorySigner_free(this_ptr_conv);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1funding_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1funding_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemoryChannelKeys_get_funding_key(&this_ptr_conv));
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemorySigner_get_funding_key(&this_ptr_conv));
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1funding_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1funding_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKSecretKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 32);
        (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.bytes);
-       InMemoryChannelKeys_set_funding_key(&this_ptr_conv, val_ref);
+       InMemorySigner_set_funding_key(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1revocation_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1revocation_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemoryChannelKeys_get_revocation_base_key(&this_ptr_conv));
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemorySigner_get_revocation_base_key(&this_ptr_conv));
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1revocation_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1revocation_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKSecretKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 32);
        (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.bytes);
-       InMemoryChannelKeys_set_revocation_base_key(&this_ptr_conv, val_ref);
+       InMemorySigner_set_revocation_base_key(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1payment_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1payment_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemoryChannelKeys_get_payment_key(&this_ptr_conv));
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemorySigner_get_payment_key(&this_ptr_conv));
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1payment_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1payment_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKSecretKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 32);
        (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.bytes);
-       InMemoryChannelKeys_set_payment_key(&this_ptr_conv, val_ref);
+       InMemorySigner_set_payment_key(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1delayed_1payment_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1delayed_1payment_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemoryChannelKeys_get_delayed_payment_base_key(&this_ptr_conv));
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemorySigner_get_delayed_payment_base_key(&this_ptr_conv));
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1delayed_1payment_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1delayed_1payment_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKSecretKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 32);
        (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.bytes);
-       InMemoryChannelKeys_set_delayed_payment_base_key(&this_ptr_conv, val_ref);
+       InMemorySigner_set_delayed_payment_base_key(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1htlc_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1htlc_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemoryChannelKeys_get_htlc_base_key(&this_ptr_conv));
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemorySigner_get_htlc_base_key(&this_ptr_conv));
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1htlc_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1htlc_1base_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKSecretKey val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 32);
        (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.bytes);
-       InMemoryChannelKeys_set_htlc_base_key(&this_ptr_conv, val_ref);
+       InMemorySigner_set_htlc_base_key(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1commitment_1seed(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1commitment_1seed(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemoryChannelKeys_get_commitment_seed(&this_ptr_conv));
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *InMemorySigner_get_commitment_seed(&this_ptr_conv));
        return ret_arr;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1commitment_1seed(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKThirtyTwoBytes val_ref;
        CHECK((*env)->GetArrayLength(env, val) == 32);
        (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
-       InMemoryChannelKeys_set_commitment_seed(&this_ptr_conv, val_ref);
+       InMemorySigner_set_commitment_seed(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKInMemorySigner orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKInMemorySigner ret_var = InMemorySigner_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new(JNIEnv *env, jclass clz, int8_tArray funding_key, int8_tArray revocation_base_key, int8_tArray payment_key, int8_tArray delayed_payment_base_key, int8_tArray htlc_base_key, int8_tArray commitment_seed, int64_t channel_value_satoshis, int64_t key_derivation_params) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1new(JNIEnv *env, jclass clz, int8_tArray funding_key, int8_tArray revocation_base_key, int8_tArray payment_key, int8_tArray delayed_payment_base_key, int8_tArray htlc_base_key, int8_tArray commitment_seed, int64_t channel_value_satoshis, int8_tArray channel_keys_id) {
        LDKSecretKey funding_key_ref;
        CHECK((*env)->GetArrayLength(env, funding_key) == 32);
        (*env)->GetByteArrayRegion(env, funding_key, 0, 32, funding_key_ref.bytes);
@@ -8602,9 +11249,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new(JN
        LDKThirtyTwoBytes commitment_seed_ref;
        CHECK((*env)->GetArrayLength(env, commitment_seed) == 32);
        (*env)->GetByteArrayRegion(env, commitment_seed, 0, 32, commitment_seed_ref.data);
-       LDKC2Tuple_u64u64Z key_derivation_params_conv = *(LDKC2Tuple_u64u64Z*)(((uint64_t)key_derivation_params) & ~1);
-       FREE((void*)key_derivation_params);
-       LDKInMemoryChannelKeys ret_var = InMemoryChannelKeys_new(funding_key_ref, revocation_base_key_ref, payment_key_ref, delayed_payment_base_key_ref, htlc_base_key_ref, commitment_seed_ref, channel_value_satoshis, key_derivation_params_conv);
+       LDKThirtyTwoBytes channel_keys_id_ref;
+       CHECK((*env)->GetArrayLength(env, channel_keys_id) == 32);
+       (*env)->GetByteArrayRegion(env, channel_keys_id, 0, 32, channel_keys_id_ref.data);
+       LDKInMemorySigner ret_var = InMemorySigner_new(funding_key_ref, revocation_base_key_ref, payment_key_ref, delayed_payment_base_key_ref, htlc_base_key_ref, commitment_seed_ref, channel_value_satoshis, channel_keys_id_ref);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8614,11 +11262,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new(JN
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counterparty_1pubkeys(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1counterparty_1pubkeys(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKChannelPublicKeys ret_var = InMemoryChannelKeys_counterparty_pubkeys(&this_arg_conv);
+       LDKChannelPublicKeys ret_var = InMemorySigner_counterparty_pubkeys(&this_arg_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8628,35 +11276,35 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counte
        return ret_ref;
 }
 
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counterparty_1selected_1contest_1delay(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1counterparty_1selected_1contest_1delay(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       int16_t ret_val = InMemoryChannelKeys_counterparty_selected_contest_delay(&this_arg_conv);
+       int16_t ret_val = InMemorySigner_counterparty_selected_contest_delay(&this_arg_conv);
        return ret_val;
 }
 
-JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1holder_1selected_1contest_1delay(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1holder_1selected_1contest_1delay(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       int16_t ret_val = InMemoryChannelKeys_holder_selected_contest_delay(&this_arg_conv);
+       int16_t ret_val = InMemorySigner_holder_selected_contest_delay(&this_arg_conv);
        return ret_val;
 }
 
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1is_1outbound(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1is_1outbound(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       jboolean ret_val = InMemoryChannelKeys_is_outbound(&this_arg_conv);
+       jboolean ret_val = InMemorySigner_is_outbound(&this_arg_conv);
        return ret_val;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1funding_1outpoint(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1funding_1outpoint(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKOutPoint ret_var = InMemoryChannelKeys_funding_outpoint(&this_arg_conv);
+       LDKOutPoint ret_var = InMemorySigner_funding_outpoint(&this_arg_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8666,11 +11314,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1fundin
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1channel_1parameters(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1channel_1parameters(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKChannelTransactionParameters ret_var = InMemoryChannelKeys_get_channel_parameters(&this_arg_conv);
+       LDKChannelTransactionParameters ret_var = InMemorySigner_get_channel_parameters(&this_arg_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8680,32 +11328,66 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1c
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1as_1ChannelKeys(JNIEnv *env, jclass clz, int64_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1sign_1counterparty_1payment_1input(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray spend_tx, int64_t input_idx, int64_t descriptor) {
+       LDKInMemorySigner this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKTransaction spend_tx_ref;
+       spend_tx_ref.datalen = (*env)->GetArrayLength(env, spend_tx);
+       spend_tx_ref.data = MALLOC(spend_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, spend_tx, 0, spend_tx_ref.datalen, spend_tx_ref.data);
+       spend_tx_ref.data_is_owned = true;
+       LDKStaticPaymentOutputDescriptor descriptor_conv;
+       descriptor_conv.inner = (void*)(descriptor & (~1));
+       descriptor_conv.is_owned = false;
+       LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+       *ret_conv = InMemorySigner_sign_counterparty_payment_input(&this_arg_conv, spend_tx_ref, input_idx, &descriptor_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1sign_1dynamic_1p2wsh_1input(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray spend_tx, int64_t input_idx, int64_t descriptor) {
+       LDKInMemorySigner this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKTransaction spend_tx_ref;
+       spend_tx_ref.datalen = (*env)->GetArrayLength(env, spend_tx);
+       spend_tx_ref.data = MALLOC(spend_tx_ref.datalen, "LDKTransaction Bytes");
+       (*env)->GetByteArrayRegion(env, spend_tx, 0, spend_tx_ref.datalen, spend_tx_ref.data);
+       spend_tx_ref.data_is_owned = true;
+       LDKDelayedPaymentOutputDescriptor descriptor_conv;
+       descriptor_conv.inner = (void*)(descriptor & (~1));
+       descriptor_conv.is_owned = false;
+       LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+       *ret_conv = InMemorySigner_sign_dynamic_p2wsh_input(&this_arg_conv, spend_tx_ref, input_idx, &descriptor_conv);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1as_1Sign(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *ret = InMemoryChannelKeys_as_ChannelKeys(&this_arg_conv);
+       LDKSign* ret = MALLOC(sizeof(LDKSign), "LDKSign");
+       *ret = InMemorySigner_as_Sign(&this_arg_conv);
        return (long)ret;
 }
 
-JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1write(JNIEnv *env, jclass clz, int64_t obj) {
-       LDKInMemoryChannelKeys obj_conv;
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKInMemorySigner obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = InMemoryChannelKeys_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = InMemorySigner_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_InMemoryChannelKeys_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InMemorySigner_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_InMemoryChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ), "LDKCResult_InMemoryChannelKeysDecodeErrorZ");
-       *ret_conv = InMemoryChannelKeys_read(ser_ref);
+       LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
+       *ret_conv = InMemorySigner_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
        return (long)ret_conv;
 }
@@ -8717,13 +11399,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysManager_1free(JNIEnv *env,
        KeysManager_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1new(JNIEnv *env, jclass clz, int8_tArray seed, jclass network, int64_t starting_time_secs, int32_t starting_time_nanos) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1new(JNIEnv *env, jclass clz, int8_tArray seed, int64_t starting_time_secs, int32_t starting_time_nanos) {
        unsigned char seed_arr[32];
        CHECK((*env)->GetArrayLength(env, seed) == 32);
        (*env)->GetByteArrayRegion(env, seed, 0, 32, seed_arr);
        unsigned char (*seed_ref)[32] = &seed_arr;
-       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
-       LDKKeysManager ret_var = KeysManager_new(seed_ref, network_conv, starting_time_secs, starting_time_nanos);
+       LDKKeysManager ret_var = KeysManager_new(seed_ref, starting_time_secs, starting_time_nanos);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8733,11 +11414,15 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1new(JNIEnv *en
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1derive_1channel_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_value_satoshis, int64_t params_1, int64_t params_2) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1derive_1channel_1keys(JNIEnv *env, jclass clz, int64_t this_arg, int64_t channel_value_satoshis, int8_tArray params) {
        LDKKeysManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKInMemoryChannelKeys ret_var = KeysManager_derive_channel_keys(&this_arg_conv, channel_value_satoshis, params_1, params_2);
+       unsigned char params_arr[32];
+       CHECK((*env)->GetArrayLength(env, params) == 32);
+       (*env)->GetByteArrayRegion(env, params, 0, 32, params_arr);
+       unsigned char (*params_ref)[32] = &params_arr;
+       LDKInMemorySigner ret_var = KeysManager_derive_channel_keys(&this_arg_conv, channel_value_satoshis, params_ref);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8747,6 +11432,47 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1derive_1channe
        return ret_ref;
 }
 
+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) {
+       LDKKeysManager this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       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];
+               LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)descriptors_conv_27) & ~1);
+               FREE((void*)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];
+               LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(((uint64_t)outputs_conv_7) & ~1);
+               FREE((void*)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);
+       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);
+       return (long)ret_conv;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_KeysManager_1as_1KeysInterface(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKKeysManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -8763,18 +11489,69 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1free(JNIEnv *e
        ChannelManager_free(this_ptr_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelDetails this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainParameters_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChainParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelDetails_free(this_ptr_conv);
+       ChainParameters_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelDetails orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelDetails ret_var = ChannelDetails_clone(&orig_conv);
+JNIEXPORT jclass JNICALL Java_org_ldk_impl_bindings_ChainParameters_1get_1network(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       jclass ret_conv = LDKNetwork_to_java(env, ChainParameters_get_network(&this_ptr_conv));
+       return ret_conv;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainParameters_1set_1network(JNIEnv *env, jclass clz, int64_t this_ptr, jclass val) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKNetwork val_conv = LDKNetwork_from_java(env, val);
+       ChainParameters_set_network(&this_ptr_conv, val_conv);
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChainParameters_1get_1latest_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, *ChainParameters_get_latest_hash(&this_ptr_conv));
+       return ret_arr;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainParameters_1set_1latest_1hash(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK((*env)->GetArrayLength(env, val) == 32);
+       (*env)->GetByteArrayRegion(env, val, 0, 32, val_ref.data);
+       ChainParameters_set_latest_hash(&this_ptr_conv, val_ref);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChainParameters_1get_1latest_1height(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int64_t ret_val = ChainParameters_get_latest_height(&this_ptr_conv);
+       return ret_val;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainParameters_1set_1latest_1height(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       ChainParameters_set_latest_height(&this_ptr_conv, val);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChainParameters_1new(JNIEnv *env, jclass clz, jclass network_arg, int8_tArray latest_hash_arg, int64_t latest_height_arg) {
+       LDKNetwork network_arg_conv = LDKNetwork_from_java(env, network_arg);
+       LDKThirtyTwoBytes latest_hash_arg_ref;
+       CHECK((*env)->GetArrayLength(env, latest_hash_arg) == 32);
+       (*env)->GetByteArrayRegion(env, latest_hash_arg, 0, 32, latest_hash_arg_ref.data);
+       LDKChainParameters ret_var = ChainParameters_new(network_arg_conv, latest_hash_arg_ref, latest_height_arg);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8784,6 +11561,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelDetails this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelDetails_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -8807,9 +11591,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1re
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, ChannelDetails_get_remote_network_id(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, ChannelDetails_get_remote_network_id(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1remote_1network_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -8843,7 +11627,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1counterpa
        LDKInitFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
+       val_conv = InitFeatures_clone(&val_conv);
        ChannelDetails_set_counterparty_features(&this_ptr_conv, val_conv);
 }
 
@@ -8922,18 +11706,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1is_1live(
        ChannelDetails_set_is_live(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKPaymentSendFailure this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       PaymentSendFailure_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKPaymentSendFailure orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelDetails orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKPaymentSendFailure ret_var = PaymentSendFailure_clone(&orig_conv);
+       LDKChannelDetails ret_var = ChannelDetails_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8943,8 +11720,22 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1clone(J
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1new(JNIEnv *env, jclass clz, jclass network, int64_t fee_est, int64_t chain_monitor, int64_t tx_broadcaster, int64_t logger, int64_t keys_manager, int64_t config, int64_t current_blockchain_height) {
-       LDKNetwork network_conv = LDKNetwork_from_java(env, network);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       if ((this_ptr & 1) != 0) return;
+       LDKPaymentSendFailure this_ptr_conv = *(LDKPaymentSendFailure*)(((uint64_t)this_ptr) & ~1);
+       FREE((void*)this_ptr);
+       PaymentSendFailure_free(this_ptr_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKPaymentSendFailure* orig_conv = (LDKPaymentSendFailure*)orig;
+       LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
+       *ret_copy = PaymentSendFailure_clone(orig_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1new(JNIEnv *env, jclass clz, int64_t fee_est, int64_t chain_monitor, int64_t tx_broadcaster, int64_t logger, int64_t keys_manager, int64_t config, int64_t params) {
        LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)(((uint64_t)fee_est) & ~1);
        if (fee_est_conv.free == LDKFeeEstimator_JCalls_free) {
                // If this_arg is a JCalls struct, then we need to increment the refcnt in it.
@@ -8974,7 +11765,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1new(JNIEnv
        config_conv.inner = (void*)(config & (~1));
        config_conv.is_owned = (config & 1) || (config == 0);
        config_conv = UserConfig_clone(&config_conv);
-       LDKChannelManager ret_var = ChannelManager_new(network_conv, fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height);
+       LDKChainParameters params_conv;
+       params_conv.inner = (void*)(params & (~1));
+       params_conv.is_owned = (params & 1) || (params == 0);
+       // Warning: we need a move here but no clone is available for LDKChainParameters
+       LDKChannelManager ret_var = ChannelManager_new(fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, params_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9008,14 +11803,14 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
        for (size_t q = 0; q < ret_var.datalen; q++) {
-               LDKChannelDetails arr_conv_16_var = ret_var.data[q];
-               CHECK((((long)arr_conv_16_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_16_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_16_ref = (long)arr_conv_16_var.inner;
-               if (arr_conv_16_var.is_owned) {
-                       arr_conv_16_ref |= 1;
+               LDKChannelDetails ret_conv_16_var = ret_var.data[q];
+               CHECK((((long)ret_conv_16_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+               CHECK((((long)&ret_conv_16_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+               long ret_conv_16_ref = (long)ret_conv_16_var.inner;
+               if (ret_conv_16_var.is_owned) {
+                       ret_conv_16_ref |= 1;
                }
-               ret_arr_ptr[q] = arr_conv_16_ref;
+               ret_arr_ptr[q] = ret_conv_16_ref;
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -9030,14 +11825,14 @@ JNIEXPORT int64_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1list_1
        int64_tArray ret_arr = (*env)->NewLongArray(env, ret_var.datalen);
        int64_t *ret_arr_ptr = (*env)->GetPrimitiveArrayCritical(env, ret_arr, NULL);
        for (size_t q = 0; q < ret_var.datalen; q++) {
-               LDKChannelDetails arr_conv_16_var = ret_var.data[q];
-               CHECK((((long)arr_conv_16_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_16_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_16_ref = (long)arr_conv_16_var.inner;
-               if (arr_conv_16_var.is_owned) {
-                       arr_conv_16_ref |= 1;
+               LDKChannelDetails ret_conv_16_var = ret_var.data[q];
+               CHECK((((long)ret_conv_16_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+               CHECK((((long)&ret_conv_16_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+               long ret_conv_16_ref = (long)ret_conv_16_var.inner;
+               if (ret_conv_16_var.is_owned) {
+                       ret_conv_16_ref |= 1;
                }
-               ret_arr_ptr[q] = arr_conv_16_ref;
+               ret_arr_ptr[q] = ret_conv_16_ref;
        }
        (*env)->ReleasePrimitiveArrayCritical(env, ret_arr, ret_arr_ptr, 0);
        FREE(ret_var.data);
@@ -9128,10 +11923,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1broadcast_1nod
                addresses_constr.data = NULL;
        int64_t* addresses_vals = (*env)->GetLongArrayElements (env, addresses, NULL);
        for (size_t m = 0; m < addresses_constr.datalen; m++) {
-               int64_t arr_conv_12 = addresses_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               addresses_constr.data[m] = arr_conv_12_conv;
+               int64_t addresses_conv_12 = addresses_vals[m];
+               LDKNetAddress addresses_conv_12_conv = *(LDKNetAddress*)(((uint64_t)addresses_conv_12) & ~1);
+               FREE((void*)addresses_conv_12);
+               addresses_constr.data[m] = addresses_conv_12_conv;
        }
        (*env)->ReleaseLongArrayElements(env, addresses, addresses_vals, 0);
        ChannelManager_broadcast_node_announcement(&this_arg_conv, rgb_ref, alias_ref, addresses_constr);
@@ -9184,9 +11979,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1get_1ou
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, ChannelManager_get_our_node_id(&this_arg_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, ChannelManager_get_our_node_id(&this_arg_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1channel_1monitor_1updated(JNIEnv *env, jclass clz, int64_t this_arg, int64_t funding_txo, int64_t highest_applied_update_id) {
@@ -9217,6 +12012,15 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1EventsP
        return (long)ret;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1Listen(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKListen* ret = MALLOC(sizeof(LDKListen), "LDKListen");
+       *ret = ChannelManager_as_Listen(&this_arg_conv);
+       return (long)ret;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1connected(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray header, int64_tArray txdata, int32_t height) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -9233,10 +12037,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1connect
                txdata_constr.data = NULL;
        int64_t* txdata_vals = (*env)->GetLongArrayElements (env, txdata, NULL);
        for (size_t y = 0; y < txdata_constr.datalen; y++) {
-               int64_t arr_conv_24 = txdata_vals[y];
-               LDKC2Tuple_usizeTransactionZ arr_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_conv_24) & ~1);
-               FREE((void*)arr_conv_24);
-               txdata_constr.data[y] = arr_conv_24_conv;
+               int64_t txdata_conv_24 = txdata_vals[y];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_24_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_24) & ~1);
+               FREE((void*)txdata_conv_24);
+               txdata_constr.data[y] = txdata_conv_24_conv;
        }
        (*env)->ReleaseLongArrayElements(env, txdata, txdata_vals, 0);
        ChannelManager_block_connected(&this_arg_conv, header_ref, txdata_constr, height);
@@ -9253,6 +12057,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1disconn
        ChannelManager_block_disconnected(&this_arg_conv, header_ref);
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1await_1persistable_1update(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       ChannelManager_await_persistable_update(&this_arg_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1ChannelMessageHandler(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -9266,11 +12077,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelManager_1write(J
        LDKChannelManager obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelManager_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelManager_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 void JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -9443,11 +12254,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelManagerReadArgs_1new
                channel_monitors_constr.data = NULL;
        int64_t* channel_monitors_vals = (*env)->GetLongArrayElements (env, channel_monitors, NULL);
        for (size_t q = 0; q < channel_monitors_constr.datalen; q++) {
-               int64_t arr_conv_16 = channel_monitors_vals[q];
-               LDKChannelMonitor arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               channel_monitors_constr.data[q] = arr_conv_16_conv;
+               int64_t channel_monitors_conv_16 = channel_monitors_vals[q];
+               LDKChannelMonitor channel_monitors_conv_16_conv;
+               channel_monitors_conv_16_conv.inner = (void*)(channel_monitors_conv_16 & (~1));
+               channel_monitors_conv_16_conv.is_owned = (channel_monitors_conv_16 & 1) || (channel_monitors_conv_16 == 0);
+               channel_monitors_constr.data[q] = channel_monitors_conv_16_conv;
        }
        (*env)->ReleaseLongArrayElements(env, channel_monitors, channel_monitors_vals, 0);
        LDKChannelManagerReadArgs ret_var = ChannelManagerReadArgs_new(keys_manager_conv, fee_estimator_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, default_config_conv, channel_monitors_constr);
@@ -9502,11 +12313,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1free(JNIEnv *env, jclass
        Init_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Init_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKInit orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKInit ret_var = Init_clone(&orig_conv);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Init_1get_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKInit this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKInitFeatures ret_var = Init_get_features(&this_ptr_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9516,18 +12327,37 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Init_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKErrorMessage this_ptr_conv;
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1set_1features(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
+       LDKInit this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ErrorMessage_free(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKInitFeatures val_conv;
+       val_conv.inner = (void*)(val & (~1));
+       val_conv.is_owned = (val & 1) || (val == 0);
+       val_conv = InitFeatures_clone(&val_conv);
+       Init_set_features(&this_ptr_conv, val_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKErrorMessage orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Init_1new(JNIEnv *env, jclass clz, int64_t features_arg) {
+       LDKInitFeatures features_arg_conv;
+       features_arg_conv.inner = (void*)(features_arg & (~1));
+       features_arg_conv.is_owned = (features_arg & 1) || (features_arg == 0);
+       features_arg_conv = InitFeatures_clone(&features_arg_conv);
+       LDKInit ret_var = Init_new(features_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Init_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKInit orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKErrorMessage ret_var = ErrorMessage_clone(&orig_conv);
+       LDKInit ret_var = Init_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9537,6 +12367,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKErrorMessage this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ErrorMessage_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -9594,18 +12431,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new(JNIEnv *e
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKPing this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Ping_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Ping_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKPing orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKErrorMessage orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKPing ret_var = Ping_clone(&orig_conv);
+       LDKErrorMessage ret_var = ErrorMessage_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9615,6 +12445,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Ping_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPing this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Ping_free(this_ptr_conv);
+}
+
 JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_Ping_1get_1ponglen(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKPing this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9656,18 +12493,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Ping_1new(JNIEnv *env, jcla
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKPong this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Pong_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Pong_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKPong orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Ping_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKPing orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKPong ret_var = Pong_clone(&orig_conv);
+       LDKPing ret_var = Ping_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9677,6 +12507,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Pong_1clone(JNIEnv *env, jc
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKPong this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Pong_free(this_ptr_conv);
+}
+
 JNIEXPORT int16_t JNICALL Java_org_ldk_impl_bindings_Pong_1get_1byteslen(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKPong this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9703,18 +12540,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Pong_1new(JNIEnv *env, jcla
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       OpenChannel_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKOpenChannel orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Pong_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKPong orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv);
+       LDKPong ret_var = Pong_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9724,6 +12554,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone(JNIEnv *
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       OpenChannel_free(this_ptr_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;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9901,9 +12738,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1fundi
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_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) {
@@ -9920,9 +12757,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1revoc
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_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) {
@@ -9939,9 +12776,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1payme
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, OpenChannel_get_payment_point(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_get_payment_point(&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) {
@@ -9958,9 +12795,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1delay
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       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);
+       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) {
@@ -9977,9 +12814,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1htlc_
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, OpenChannel_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) {
@@ -9996,9 +12833,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1get_1first
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       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);
+       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) {
@@ -10026,18 +12863,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1fla
        OpenChannel_set_channel_flags(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       AcceptChannel_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKAcceptChannel orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKOpenChannel orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKAcceptChannel ret_var = AcceptChannel_clone(&orig_conv);
+       LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10047,6 +12877,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       AcceptChannel_free(this_ptr_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;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10175,9 +13012,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1fun
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_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) {
@@ -10194,9 +13031,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1rev
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_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) {
@@ -10213,9 +13050,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1pay
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_get_payment_point(&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) {
@@ -10232,9 +13069,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1del
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       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);
+       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) {
@@ -10251,9 +13088,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1htl
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, AcceptChannel_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) {
@@ -10270,9 +13107,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1get_1fir
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       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);
+       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) {
@@ -10285,18 +13122,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per
        AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKFundingCreated this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingCreated_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKFundingCreated orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKAcceptChannel orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingCreated ret_var = FundingCreated_clone(&orig_conv);
+       LDKAcceptChannel ret_var = AcceptChannel_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10306,6 +13136,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKFundingCreated this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingCreated_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -10363,9 +13200,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1get_1si
        LDKFundingCreated this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, FundingCreated_get_signature(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, FundingCreated_get_signature(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1set_1signature(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -10398,18 +13235,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKFundingSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingSigned_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKFundingSigned orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKFundingCreated orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingSigned ret_var = FundingSigned_clone(&orig_conv);
+       LDKFundingCreated ret_var = FundingCreated_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10419,6 +13249,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKFundingSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingSigned_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -10442,9 +13279,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1get_1sig
        LDKFundingSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, FundingSigned_get_signature(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, FundingSigned_get_signature(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1set_1signature(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -10474,18 +13311,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKFundingLocked this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingLocked_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingLocked_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKFundingLocked orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKFundingSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingLocked ret_var = FundingLocked_clone(&orig_conv);
+       LDKFundingSigned ret_var = FundingSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10495,6 +13325,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingLocked_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKFundingLocked this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingLocked_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1channel_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKFundingLocked this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10518,9 +13355,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingLocked_1get_1nex
        LDKFundingLocked this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, FundingLocked_get_next_per_commitment_point(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, FundingLocked_get_next_per_commitment_point(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1set_1next_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -10550,18 +13387,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKShutdown this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Shutdown_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKShutdown orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_FundingLocked_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKFundingLocked orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKShutdown ret_var = Shutdown_clone(&orig_conv);
+       LDKFundingLocked ret_var = FundingLocked_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10571,6 +13401,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone(JNIEnv *env
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKShutdown this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Shutdown_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -10594,10 +13431,10 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1get_1scriptpu
        LDKShutdown this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       LDKu8slice arg_var = Shutdown_get_scriptpubkey(&this_ptr_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       return arg_arr;
+       LDKu8slice ret_var = Shutdown_get_scriptpubkey(&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);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1set_1scriptpubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -10629,18 +13466,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1new(JNIEnv *env,
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKClosingSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ClosingSigned_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKClosingSigned orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKShutdown orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKClosingSigned ret_var = ClosingSigned_clone(&orig_conv);
+       LDKShutdown ret_var = Shutdown_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10650,6 +13480,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKClosingSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ClosingSigned_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -10688,9 +13525,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1get_1sig
        LDKClosingSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, ClosingSigned_get_signature(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, ClosingSigned_get_signature(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1set_1signature(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -10720,18 +13557,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUpdateAddHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateAddHTLC_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUpdateAddHTLC orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKClosingSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_clone(&orig_conv);
+       LDKClosingSigned ret_var = ClosingSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10741,6 +13571,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUpdateAddHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateAddHTLC_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -10824,18 +13661,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1cltv_1expi
        UpdateAddHTLC_set_cltv_expiry(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUpdateFulfillHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFulfillHTLC_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUpdateFulfillHTLC orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUpdateAddHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_clone(&orig_conv);
+       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10845,6 +13675,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUpdateFulfillHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFulfillHTLC_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -10915,18 +13752,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new(JNIE
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUpdateFailHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFailHTLC_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUpdateFailHTLC orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUpdateFulfillHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_clone(&orig_conv);
+       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10936,6 +13766,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUpdateFailHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFailHTLC_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -10970,18 +13807,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1htlc_1id(
        UpdateFailHTLC_set_htlc_id(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUpdateFailMalformedHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFailMalformedHTLC_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUpdateFailMalformedHTLC orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUpdateFailHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_clone(&orig_conv);
+       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10991,6 +13821,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1cl
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUpdateFailMalformedHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFailMalformedHTLC_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -11040,18 +13877,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1
        UpdateFailMalformedHTLC_set_failure_code(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKCommitmentSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       CommitmentSigned_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCommitmentSigned orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUpdateFailMalformedHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKCommitmentSigned ret_var = CommitmentSigned_clone(&orig_conv);
+       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11061,6 +13891,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommitmentSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       CommitmentSigned_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -11084,9 +13921,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1get_1
        LDKCommitmentSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, CommitmentSigned_get_signature(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, CommitmentSigned_get_signature(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1signature(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11110,11 +13947,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1set_1htlc_1s
        else
                val_constr.data = NULL;
        for (size_t i = 0; i < val_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, val, i);
-               LDKSignature arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
-               val_constr.data[i] = arr_conv_8_ref;
+               int8_tArray val_conv_8 = (*env)->GetObjectArrayElement(env, val, i);
+               LDKSignature val_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, val_conv_8) == 64);
+               (*env)->GetByteArrayRegion(env, val_conv_8, 0, 64, val_conv_8_ref.compact_form);
+               val_constr.data[i] = val_conv_8_ref;
        }
        CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr);
 }
@@ -11133,11 +13970,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEn
        else
                htlc_signatures_arg_constr.data = NULL;
        for (size_t i = 0; i < htlc_signatures_arg_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, htlc_signatures_arg, i);
-               LDKSignature arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
-               htlc_signatures_arg_constr.data[i] = arr_conv_8_ref;
+               int8_tArray htlc_signatures_arg_conv_8 = (*env)->GetObjectArrayElement(env, htlc_signatures_arg, i);
+               LDKSignature htlc_signatures_arg_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, htlc_signatures_arg_conv_8) == 64);
+               (*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);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -11149,18 +13986,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new(JNIEn
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKRevokeAndACK this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       RevokeAndACK_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKRevokeAndACK orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCommitmentSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKRevokeAndACK ret_var = RevokeAndACK_clone(&orig_conv);
+       LDKCommitmentSigned ret_var = CommitmentSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11170,6 +14000,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKRevokeAndACK this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       RevokeAndACK_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -11212,9 +14049,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1get_1next
        LDKRevokeAndACK this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, RevokeAndACK_get_next_per_commitment_point(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, RevokeAndACK_get_next_per_commitment_point(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1set_1next_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11247,18 +14084,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new(JNIEnv *e
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUpdateFee this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFee_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUpdateFee orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRevokeAndACK orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFee ret_var = UpdateFee_clone(&orig_conv);
+       LDKRevokeAndACK ret_var = RevokeAndACK_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11268,6 +14098,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUpdateFee this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFee_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -11316,6 +14153,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new(JNIEnv *env,
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUpdateFee orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKUpdateFee ret_var = UpdateFee_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKDataLossProtect this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11323,20 +14174,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free(JNIEnv *
        DataLossProtect_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKDataLossProtect orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKDataLossProtect ret_var = DataLossProtect_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1your_1last_1per_1commitment_1secret(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKDataLossProtect this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11360,9 +14197,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1get_1m
        LDKDataLossProtect this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, DataLossProtect_get_my_current_per_commitment_point(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, DataLossProtect_get_my_current_per_commitment_point(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1set_1my_1current_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11392,18 +14229,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1new(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelReestablish this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelReestablish_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelReestablish orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKDataLossProtect orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelReestablish ret_var = ChannelReestablish_clone(&orig_conv);
+       LDKDataLossProtect ret_var = DataLossProtect_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11413,6 +14243,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone(J
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelReestablish this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelReestablish_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -11462,18 +14299,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_
        ChannelReestablish_set_next_remote_commitment_number(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKAnnouncementSignatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       AnnouncementSignatures_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKAnnouncementSignatures orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelReestablish orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_clone(&orig_conv);
+       LDKChannelReestablish ret_var = ChannelReestablish_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11483,6 +14313,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clo
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKAnnouncementSignatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       AnnouncementSignatures_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray 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 = (void*)(this_ptr & (~1));
@@ -11521,9 +14358,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, AnnouncementSignatures_get_node_signature(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, AnnouncementSignatures_get_node_signature(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1node_1signature(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11540,9 +14377,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, AnnouncementSignatures_get_bitcoin_signature(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, AnnouncementSignatures_get_bitcoin_signature(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1bitcoin_1signature(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11575,6 +14412,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKAnnouncementSignatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetAddress_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKNetAddress this_ptr_conv = *(LDKNetAddress*)(((uint64_t)this_ptr) & ~1);
@@ -11592,11 +14443,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetAddress_1clone(JNIEnv *e
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NetAddress_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNetAddress* obj_conv = (LDKNetAddress*)obj;
-       LDKCVec_u8Z arg_var = NetAddress_write(obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = NetAddress_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_Result_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -11616,20 +14467,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1free
        UnsignedNodeAnnouncement_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUnsignedNodeAnnouncement orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1get_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUnsignedNodeAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11651,7 +14488,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        UnsignedNodeAnnouncement_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -11674,9 +14511,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncemen
        LDKUnsignedNodeAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, UnsignedNodeAnnouncement_get_node_id(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, UnsignedNodeAnnouncement_get_node_id(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11739,27 +14576,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_
                val_constr.data = NULL;
        int64_t* val_vals = (*env)->GetLongArrayElements (env, val, NULL);
        for (size_t m = 0; m < val_constr.datalen; m++) {
-               int64_t arr_conv_12 = val_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               val_constr.data[m] = arr_conv_12_conv;
+               int64_t val_conv_12 = val_vals[m];
+               LDKNetAddress val_conv_12_conv = *(LDKNetAddress*)(((uint64_t)val_conv_12) & ~1);
+               FREE((void*)val_conv_12);
+               val_constr.data[m] = val_conv_12_conv;
        }
        (*env)->ReleaseLongArrayElements(env, val, val_vals, 0);
        UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKNodeAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       NodeAnnouncement_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKNodeAnnouncement orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnsignedNodeAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKNodeAnnouncement ret_var = NodeAnnouncement_clone(&orig_conv);
+       LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11769,13 +14599,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       NodeAnnouncement_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKNodeAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, NodeAnnouncement_get_signature(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, NodeAnnouncement_get_signature(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1set_1signature(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11831,18 +14668,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1new(JNIEn
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUnsignedChannelAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UnsignedChannelAnnouncement_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUnsignedChannelAnnouncement orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNodeAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUnsignedChannelAnnouncement ret_var = UnsignedChannelAnnouncement_clone(&orig_conv);
+       LDKNodeAnnouncement ret_var = NodeAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11852,6 +14682,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUnsignedChannelAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UnsignedChannelAnnouncement_free(this_ptr_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1get_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11873,7 +14710,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1s
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        UnsignedChannelAnnouncement_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -11915,9 +14752,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnounce
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, UnsignedChannelAnnouncement_get_node_id_1(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, UnsignedChannelAnnouncement_get_node_id_1(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1node_1id_11(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11934,9 +14771,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnounce
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, UnsignedChannelAnnouncement_get_node_id_2(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, UnsignedChannelAnnouncement_get_node_id_2(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1node_1id_12(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11953,9 +14790,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnounce
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, UnsignedChannelAnnouncement_get_bitcoin_key_1(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, UnsignedChannelAnnouncement_get_bitcoin_key_1(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1bitcoin_1key_11(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11972,9 +14809,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnounce
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, UnsignedChannelAnnouncement_get_bitcoin_key_2(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, UnsignedChannelAnnouncement_get_bitcoin_key_2(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1set_1bitcoin_1key_12(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -11987,18 +14824,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1s
        UnsignedChannelAnnouncement_set_bitcoin_key_2(&this_ptr_conv, val_ref);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelAnnouncement_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelAnnouncement orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnsignedChannelAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelAnnouncement ret_var = ChannelAnnouncement_clone(&orig_conv);
+       LDKUnsignedChannelAnnouncement ret_var = UnsignedChannelAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12008,13 +14838,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone(
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelAnnouncement_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1get_1node_1signature_11(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, ChannelAnnouncement_get_node_signature_1(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, ChannelAnnouncement_get_node_signature_1(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1node_1signature_11(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -12031,9 +14868,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1ge
        LDKChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, ChannelAnnouncement_get_node_signature_2(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, ChannelAnnouncement_get_node_signature_2(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1node_1signature_12(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -12050,9 +14887,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1ge
        LDKChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, ChannelAnnouncement_get_bitcoin_signature_1(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, ChannelAnnouncement_get_bitcoin_signature_1(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1bitcoin_1signature_11(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -12069,9 +14906,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1ge
        LDKChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, ChannelAnnouncement_get_bitcoin_signature_2(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, ChannelAnnouncement_get_bitcoin_signature_2(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1set_1bitcoin_1signature_12(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -12136,18 +14973,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1new(JN
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKUnsignedChannelUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UnsignedChannelUpdate_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKUnsignedChannelUpdate orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUnsignedChannelUpdate ret_var = UnsignedChannelUpdate_clone(&orig_conv);
+       LDKChannelAnnouncement ret_var = ChannelAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12157,6 +14987,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clon
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKUnsignedChannelUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UnsignedChannelUpdate_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKUnsignedChannelUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12281,18 +15118,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fe
        UnsignedChannelUpdate_set_fee_proportional_millionths(&this_ptr_conv, val);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelUpdate_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelUpdate orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKUnsignedChannelUpdate orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelUpdate ret_var = ChannelUpdate_clone(&orig_conv);
+       LDKUnsignedChannelUpdate ret_var = UnsignedChannelUpdate_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12302,13 +15132,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelUpdate_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1get_1signature(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, ChannelUpdate_get_signature(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, ChannelUpdate_get_signature(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1set_1signature(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -12364,18 +15201,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new(JNIEnv *
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKQueryChannelRange this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       QueryChannelRange_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKQueryChannelRange orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelUpdate orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKQueryChannelRange ret_var = QueryChannelRange_clone(&orig_conv);
+       LDKChannelUpdate ret_var = ChannelUpdate_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12385,6 +15215,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKQueryChannelRange this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       QueryChannelRange_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKQueryChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12448,18 +15285,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1new(JNIE
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKReplyChannelRange this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ReplyChannelRange_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKReplyChannelRange orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKQueryChannelRange orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKReplyChannelRange ret_var = ReplyChannelRange_clone(&orig_conv);
+       LDKQueryChannelRange ret_var = QueryChannelRange_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12469,6 +15299,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone(JN
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKReplyChannelRange this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ReplyChannelRange_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12518,19 +15355,19 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1number
        ReplyChannelRange_set_number_of_blocks(&this_ptr_conv, val);
 }
 
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1full_1information(JNIEnv *env, jclass clz, int64_t this_ptr) {
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1sync_1complete(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       jboolean ret_val = ReplyChannelRange_get_full_information(&this_ptr_conv);
+       jboolean ret_val = ReplyChannelRange_get_sync_complete(&this_ptr_conv);
        return ret_val;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1full_1information(JNIEnv *env, jclass clz, int64_t this_ptr, jboolean val) {
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1sync_1complete(JNIEnv *env, jclass clz, int64_t this_ptr, jboolean val) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       ReplyChannelRange_set_full_information(&this_ptr_conv, val);
+       ReplyChannelRange_set_sync_complete(&this_ptr_conv, val);
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1short_1channel_1ids(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
@@ -12545,14 +15382,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1short_
                val_constr.data = NULL;
        int64_t* val_vals = (*env)->GetLongArrayElements (env, val, NULL);
        for (size_t g = 0; g < val_constr.datalen; g++) {
-               int64_t arr_conv_6 = val_vals[g];
-               val_constr.data[g] = arr_conv_6;
+               int64_t val_conv_6 = val_vals[g];
+               val_constr.data[g] = val_conv_6;
        }
        (*env)->ReleaseLongArrayElements(env, val, val_vals, 0);
        ReplyChannelRange_set_short_channel_ids(&this_ptr_conv, val_constr);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int32_t first_blocknum_arg, int32_t number_of_blocks_arg, jboolean full_information_arg, int64_tArray short_channel_ids_arg) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIEnv *env, jclass clz, int8_tArray chain_hash_arg, int32_t first_blocknum_arg, int32_t number_of_blocks_arg, jboolean sync_complete_arg, int64_tArray short_channel_ids_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);
@@ -12564,11 +15401,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIE
                short_channel_ids_arg_constr.data = NULL;
        int64_t* short_channel_ids_arg_vals = (*env)->GetLongArrayElements (env, short_channel_ids_arg, NULL);
        for (size_t g = 0; g < short_channel_ids_arg_constr.datalen; g++) {
-               int64_t arr_conv_6 = short_channel_ids_arg_vals[g];
-               short_channel_ids_arg_constr.data[g] = arr_conv_6;
+               int64_t short_channel_ids_arg_conv_6 = short_channel_ids_arg_vals[g];
+               short_channel_ids_arg_constr.data[g] = short_channel_ids_arg_conv_6;
        }
        (*env)->ReleaseLongArrayElements(env, short_channel_ids_arg, short_channel_ids_arg_vals, 0);
-       LDKReplyChannelRange ret_var = ReplyChannelRange_new(chain_hash_arg_ref, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg_constr);
+       LDKReplyChannelRange ret_var = ReplyChannelRange_new(chain_hash_arg_ref, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg_constr);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12578,18 +15415,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new(JNIE
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKQueryShortChannelIds this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       QueryShortChannelIds_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKQueryShortChannelIds orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKReplyChannelRange orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKQueryShortChannelIds ret_var = QueryShortChannelIds_clone(&orig_conv);
+       LDKReplyChannelRange ret_var = ReplyChannelRange_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12599,6 +15429,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKQueryShortChannelIds this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       QueryShortChannelIds_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKQueryShortChannelIds this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12630,8 +15467,8 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1set_1sho
                val_constr.data = NULL;
        int64_t* val_vals = (*env)->GetLongArrayElements (env, val, NULL);
        for (size_t g = 0; g < val_constr.datalen; g++) {
-               int64_t arr_conv_6 = val_vals[g];
-               val_constr.data[g] = arr_conv_6;
+               int64_t val_conv_6 = val_vals[g];
+               val_constr.data[g] = val_conv_6;
        }
        (*env)->ReleaseLongArrayElements(env, val, val_vals, 0);
        QueryShortChannelIds_set_short_channel_ids(&this_ptr_conv, val_constr);
@@ -12649,8 +15486,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1new(J
                short_channel_ids_arg_constr.data = NULL;
        int64_t* short_channel_ids_arg_vals = (*env)->GetLongArrayElements (env, short_channel_ids_arg, NULL);
        for (size_t g = 0; g < short_channel_ids_arg_constr.datalen; g++) {
-               int64_t arr_conv_6 = short_channel_ids_arg_vals[g];
-               short_channel_ids_arg_constr.data[g] = arr_conv_6;
+               int64_t short_channel_ids_arg_conv_6 = short_channel_ids_arg_vals[g];
+               short_channel_ids_arg_constr.data[g] = short_channel_ids_arg_conv_6;
        }
        (*env)->ReleaseLongArrayElements(env, short_channel_ids_arg, short_channel_ids_arg_vals, 0);
        LDKQueryShortChannelIds ret_var = QueryShortChannelIds_new(chain_hash_arg_ref, short_channel_ids_arg_constr);
@@ -12663,18 +15500,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1new(J
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKReplyShortChannelIdsEnd this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ReplyShortChannelIdsEnd_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKReplyShortChannelIdsEnd orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKQueryShortChannelIds orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKReplyShortChannelIdsEnd ret_var = ReplyShortChannelIdsEnd_clone(&orig_conv);
+       LDKQueryShortChannelIds ret_var = QueryShortChannelIds_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12684,6 +15514,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1cl
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKReplyShortChannelIdsEnd this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ReplyShortChannelIdsEnd_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKReplyShortChannelIdsEnd this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12732,18 +15569,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1ne
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKGossipTimestampFilter this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       GossipTimestampFilter_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKGossipTimestampFilter orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKReplyShortChannelIdsEnd orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKGossipTimestampFilter ret_var = GossipTimestampFilter_clone(&orig_conv);
+       LDKReplyShortChannelIdsEnd ret_var = ReplyShortChannelIdsEnd_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12753,6 +15583,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clon
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKGossipTimestampFilter this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       GossipTimestampFilter_free(this_ptr_conv);
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1get_1chain_1hash(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKGossipTimestampFilter this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12816,6 +15653,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1new(
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKGossipTimestampFilter orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKGossipTimestampFilter ret_var = GossipTimestampFilter_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorAction_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKErrorAction this_ptr_conv = *(LDKErrorAction*)(((uint64_t)this_ptr) & ~1);
@@ -12838,20 +15689,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1free(JNIEnv *e
        LightningError_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LightningError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKLightningError orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKLightningError ret_var = LightningError_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT jstring JNICALL Java_org_ldk_impl_bindings_LightningError_1get_1err(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKLightningError this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12908,18 +15745,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LightningError_1new(JNIEnv
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKCommitmentUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       CommitmentUpdate_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCommitmentUpdate orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_LightningError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKLightningError orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKCommitmentUpdate ret_var = CommitmentUpdate_clone(&orig_conv);
+       LDKLightningError ret_var = LightningError_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -12929,6 +15759,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone(JNI
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCommitmentUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       CommitmentUpdate_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_1add_1htlcs(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
        LDKCommitmentUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12941,12 +15778,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_
                val_constr.data = NULL;
        int64_t* val_vals = (*env)->GetLongArrayElements (env, val, NULL);
        for (size_t p = 0; p < val_constr.datalen; p++) {
-               int64_t arr_conv_15 = val_vals[p];
-               LDKUpdateAddHTLC arr_conv_15_conv;
-               arr_conv_15_conv.inner = (void*)(arr_conv_15 & (~1));
-               arr_conv_15_conv.is_owned = (arr_conv_15 & 1) || (arr_conv_15 == 0);
-               arr_conv_15_conv = UpdateAddHTLC_clone(&arr_conv_15_conv);
-               val_constr.data[p] = arr_conv_15_conv;
+               int64_t val_conv_15 = val_vals[p];
+               LDKUpdateAddHTLC val_conv_15_conv;
+               val_conv_15_conv.inner = (void*)(val_conv_15 & (~1));
+               val_conv_15_conv.is_owned = (val_conv_15 & 1) || (val_conv_15 == 0);
+               val_conv_15_conv = UpdateAddHTLC_clone(&val_conv_15_conv);
+               val_constr.data[p] = val_conv_15_conv;
        }
        (*env)->ReleaseLongArrayElements(env, val, val_vals, 0);
        CommitmentUpdate_set_update_add_htlcs(&this_ptr_conv, val_constr);
@@ -12964,12 +15801,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_
                val_constr.data = NULL;
        int64_t* val_vals = (*env)->GetLongArrayElements (env, val, NULL);
        for (size_t t = 0; t < val_constr.datalen; t++) {
-               int64_t arr_conv_19 = val_vals[t];
-               LDKUpdateFulfillHTLC arr_conv_19_conv;
-               arr_conv_19_conv.inner = (void*)(arr_conv_19 & (~1));
-               arr_conv_19_conv.is_owned = (arr_conv_19 & 1) || (arr_conv_19 == 0);
-               arr_conv_19_conv = UpdateFulfillHTLC_clone(&arr_conv_19_conv);
-               val_constr.data[t] = arr_conv_19_conv;
+               int64_t val_conv_19 = val_vals[t];
+               LDKUpdateFulfillHTLC val_conv_19_conv;
+               val_conv_19_conv.inner = (void*)(val_conv_19 & (~1));
+               val_conv_19_conv.is_owned = (val_conv_19 & 1) || (val_conv_19 == 0);
+               val_conv_19_conv = UpdateFulfillHTLC_clone(&val_conv_19_conv);
+               val_constr.data[t] = val_conv_19_conv;
        }
        (*env)->ReleaseLongArrayElements(env, val, val_vals, 0);
        CommitmentUpdate_set_update_fulfill_htlcs(&this_ptr_conv, val_constr);
@@ -12987,12 +15824,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_
                val_constr.data = NULL;
        int64_t* val_vals = (*env)->GetLongArrayElements (env, val, NULL);
        for (size_t q = 0; q < val_constr.datalen; q++) {
-               int64_t arr_conv_16 = val_vals[q];
-               LDKUpdateFailHTLC arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               arr_conv_16_conv = UpdateFailHTLC_clone(&arr_conv_16_conv);
-               val_constr.data[q] = arr_conv_16_conv;
+               int64_t val_conv_16 = val_vals[q];
+               LDKUpdateFailHTLC val_conv_16_conv;
+               val_conv_16_conv.inner = (void*)(val_conv_16 & (~1));
+               val_conv_16_conv.is_owned = (val_conv_16 & 1) || (val_conv_16 == 0);
+               val_conv_16_conv = UpdateFailHTLC_clone(&val_conv_16_conv);
+               val_constr.data[q] = val_conv_16_conv;
        }
        (*env)->ReleaseLongArrayElements(env, val, val_vals, 0);
        CommitmentUpdate_set_update_fail_htlcs(&this_ptr_conv, val_constr);
@@ -13010,12 +15847,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1update_
                val_constr.data = NULL;
        int64_t* val_vals = (*env)->GetLongArrayElements (env, val, NULL);
        for (size_t z = 0; z < val_constr.datalen; z++) {
-               int64_t arr_conv_25 = val_vals[z];
-               LDKUpdateFailMalformedHTLC arr_conv_25_conv;
-               arr_conv_25_conv.inner = (void*)(arr_conv_25 & (~1));
-               arr_conv_25_conv.is_owned = (arr_conv_25 & 1) || (arr_conv_25 == 0);
-               arr_conv_25_conv = UpdateFailMalformedHTLC_clone(&arr_conv_25_conv);
-               val_constr.data[z] = arr_conv_25_conv;
+               int64_t val_conv_25 = val_vals[z];
+               LDKUpdateFailMalformedHTLC val_conv_25_conv;
+               val_conv_25_conv.inner = (void*)(val_conv_25 & (~1));
+               val_conv_25_conv.is_owned = (val_conv_25 & 1) || (val_conv_25 == 0);
+               val_conv_25_conv = UpdateFailMalformedHTLC_clone(&val_conv_25_conv);
+               val_constr.data[z] = val_conv_25_conv;
        }
        (*env)->ReleaseLongArrayElements(env, val, val_vals, 0);
        CommitmentUpdate_set_update_fail_malformed_htlcs(&this_ptr_conv, val_constr);
@@ -13080,12 +15917,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1new(JNIEn
                update_add_htlcs_arg_constr.data = NULL;
        int64_t* update_add_htlcs_arg_vals = (*env)->GetLongArrayElements (env, update_add_htlcs_arg, NULL);
        for (size_t p = 0; p < update_add_htlcs_arg_constr.datalen; p++) {
-               int64_t arr_conv_15 = update_add_htlcs_arg_vals[p];
-               LDKUpdateAddHTLC arr_conv_15_conv;
-               arr_conv_15_conv.inner = (void*)(arr_conv_15 & (~1));
-               arr_conv_15_conv.is_owned = (arr_conv_15 & 1) || (arr_conv_15 == 0);
-               arr_conv_15_conv = UpdateAddHTLC_clone(&arr_conv_15_conv);
-               update_add_htlcs_arg_constr.data[p] = arr_conv_15_conv;
+               int64_t update_add_htlcs_arg_conv_15 = update_add_htlcs_arg_vals[p];
+               LDKUpdateAddHTLC update_add_htlcs_arg_conv_15_conv;
+               update_add_htlcs_arg_conv_15_conv.inner = (void*)(update_add_htlcs_arg_conv_15 & (~1));
+               update_add_htlcs_arg_conv_15_conv.is_owned = (update_add_htlcs_arg_conv_15 & 1) || (update_add_htlcs_arg_conv_15 == 0);
+               update_add_htlcs_arg_conv_15_conv = UpdateAddHTLC_clone(&update_add_htlcs_arg_conv_15_conv);
+               update_add_htlcs_arg_constr.data[p] = update_add_htlcs_arg_conv_15_conv;
        }
        (*env)->ReleaseLongArrayElements(env, update_add_htlcs_arg, update_add_htlcs_arg_vals, 0);
        LDKCVec_UpdateFulfillHTLCZ update_fulfill_htlcs_arg_constr;
@@ -13096,12 +15933,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1new(JNIEn
                update_fulfill_htlcs_arg_constr.data = NULL;
        int64_t* update_fulfill_htlcs_arg_vals = (*env)->GetLongArrayElements (env, update_fulfill_htlcs_arg, NULL);
        for (size_t t = 0; t < update_fulfill_htlcs_arg_constr.datalen; t++) {
-               int64_t arr_conv_19 = update_fulfill_htlcs_arg_vals[t];
-               LDKUpdateFulfillHTLC arr_conv_19_conv;
-               arr_conv_19_conv.inner = (void*)(arr_conv_19 & (~1));
-               arr_conv_19_conv.is_owned = (arr_conv_19 & 1) || (arr_conv_19 == 0);
-               arr_conv_19_conv = UpdateFulfillHTLC_clone(&arr_conv_19_conv);
-               update_fulfill_htlcs_arg_constr.data[t] = arr_conv_19_conv;
+               int64_t update_fulfill_htlcs_arg_conv_19 = update_fulfill_htlcs_arg_vals[t];
+               LDKUpdateFulfillHTLC update_fulfill_htlcs_arg_conv_19_conv;
+               update_fulfill_htlcs_arg_conv_19_conv.inner = (void*)(update_fulfill_htlcs_arg_conv_19 & (~1));
+               update_fulfill_htlcs_arg_conv_19_conv.is_owned = (update_fulfill_htlcs_arg_conv_19 & 1) || (update_fulfill_htlcs_arg_conv_19 == 0);
+               update_fulfill_htlcs_arg_conv_19_conv = UpdateFulfillHTLC_clone(&update_fulfill_htlcs_arg_conv_19_conv);
+               update_fulfill_htlcs_arg_constr.data[t] = update_fulfill_htlcs_arg_conv_19_conv;
        }
        (*env)->ReleaseLongArrayElements(env, update_fulfill_htlcs_arg, update_fulfill_htlcs_arg_vals, 0);
        LDKCVec_UpdateFailHTLCZ update_fail_htlcs_arg_constr;
@@ -13112,12 +15949,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1new(JNIEn
                update_fail_htlcs_arg_constr.data = NULL;
        int64_t* update_fail_htlcs_arg_vals = (*env)->GetLongArrayElements (env, update_fail_htlcs_arg, NULL);
        for (size_t q = 0; q < update_fail_htlcs_arg_constr.datalen; q++) {
-               int64_t arr_conv_16 = update_fail_htlcs_arg_vals[q];
-               LDKUpdateFailHTLC arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               arr_conv_16_conv = UpdateFailHTLC_clone(&arr_conv_16_conv);
-               update_fail_htlcs_arg_constr.data[q] = arr_conv_16_conv;
+               int64_t update_fail_htlcs_arg_conv_16 = update_fail_htlcs_arg_vals[q];
+               LDKUpdateFailHTLC update_fail_htlcs_arg_conv_16_conv;
+               update_fail_htlcs_arg_conv_16_conv.inner = (void*)(update_fail_htlcs_arg_conv_16 & (~1));
+               update_fail_htlcs_arg_conv_16_conv.is_owned = (update_fail_htlcs_arg_conv_16 & 1) || (update_fail_htlcs_arg_conv_16 == 0);
+               update_fail_htlcs_arg_conv_16_conv = UpdateFailHTLC_clone(&update_fail_htlcs_arg_conv_16_conv);
+               update_fail_htlcs_arg_constr.data[q] = update_fail_htlcs_arg_conv_16_conv;
        }
        (*env)->ReleaseLongArrayElements(env, update_fail_htlcs_arg, update_fail_htlcs_arg_vals, 0);
        LDKCVec_UpdateFailMalformedHTLCZ update_fail_malformed_htlcs_arg_constr;
@@ -13128,12 +15965,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1new(JNIEn
                update_fail_malformed_htlcs_arg_constr.data = NULL;
        int64_t* update_fail_malformed_htlcs_arg_vals = (*env)->GetLongArrayElements (env, update_fail_malformed_htlcs_arg, NULL);
        for (size_t z = 0; z < update_fail_malformed_htlcs_arg_constr.datalen; z++) {
-               int64_t arr_conv_25 = update_fail_malformed_htlcs_arg_vals[z];
-               LDKUpdateFailMalformedHTLC arr_conv_25_conv;
-               arr_conv_25_conv.inner = (void*)(arr_conv_25 & (~1));
-               arr_conv_25_conv.is_owned = (arr_conv_25 & 1) || (arr_conv_25 == 0);
-               arr_conv_25_conv = UpdateFailMalformedHTLC_clone(&arr_conv_25_conv);
-               update_fail_malformed_htlcs_arg_constr.data[z] = arr_conv_25_conv;
+               int64_t update_fail_malformed_htlcs_arg_conv_25 = update_fail_malformed_htlcs_arg_vals[z];
+               LDKUpdateFailMalformedHTLC update_fail_malformed_htlcs_arg_conv_25_conv;
+               update_fail_malformed_htlcs_arg_conv_25_conv.inner = (void*)(update_fail_malformed_htlcs_arg_conv_25 & (~1));
+               update_fail_malformed_htlcs_arg_conv_25_conv.is_owned = (update_fail_malformed_htlcs_arg_conv_25 & 1) || (update_fail_malformed_htlcs_arg_conv_25 == 0);
+               update_fail_malformed_htlcs_arg_conv_25_conv = UpdateFailMalformedHTLC_clone(&update_fail_malformed_htlcs_arg_conv_25_conv);
+               update_fail_malformed_htlcs_arg_constr.data[z] = update_fail_malformed_htlcs_arg_conv_25_conv;
        }
        (*env)->ReleaseLongArrayElements(env, update_fail_malformed_htlcs_arg, update_fail_malformed_htlcs_arg_vals, 0);
        LDKUpdateFee update_fee_arg_conv;
@@ -13154,6 +15991,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1new(JNIEn
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCommitmentUpdate orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKCommitmentUpdate ret_var = CommitmentUpdate_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCFailChannelUpdate_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKHTLCFailChannelUpdate this_ptr_conv = *(LDKHTLCFailChannelUpdate*)(((uint64_t)this_ptr) & ~1);
@@ -13187,63 +16038,53 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1write(JN
        LDKAcceptChannel obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = AcceptChannel_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = AcceptChannel_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_AcceptChannel_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);
-       LDKAcceptChannel ret_var = AcceptChannel_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = AcceptChannel_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKAnnouncementSignatures obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = AnnouncementSignatures_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = AnnouncementSignatures_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_AnnouncementSignatures_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);
-       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = AnnouncementSignatures_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelReestablish obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelReestablish_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelReestablish_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_ChannelReestablish_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13260,141 +16101,116 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1write(JN
        LDKClosingSigned obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ClosingSigned_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ClosingSigned_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_ClosingSigned_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);
-       LDKClosingSigned ret_var = ClosingSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = ClosingSigned_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKCommitmentSigned obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = CommitmentSigned_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = CommitmentSigned_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_CommitmentSigned_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);
-       LDKCommitmentSigned ret_var = CommitmentSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CommitmentSigned_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingCreated_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKFundingCreated obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = FundingCreated_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = FundingCreated_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_FundingCreated_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);
-       LDKFundingCreated ret_var = FundingCreated_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = FundingCreated_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingSigned_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKFundingSigned obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = FundingSigned_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = FundingSigned_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_FundingSigned_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);
-       LDKFundingSigned ret_var = FundingSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = FundingSigned_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_FundingLocked_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKFundingLocked obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = FundingLocked_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = FundingLocked_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_FundingLocked_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);
-       LDKFundingLocked ret_var = FundingLocked_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = FundingLocked_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Init_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKInit obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Init_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Init_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_Init_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13411,219 +16227,179 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_OpenChannel_1write(JNIE
        LDKOpenChannel obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = OpenChannel_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = OpenChannel_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_OpenChannel_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);
-       LDKOpenChannel ret_var = OpenChannel_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = OpenChannel_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKRevokeAndACK obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = RevokeAndACK_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = RevokeAndACK_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_RevokeAndACK_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);
-       LDKRevokeAndACK ret_var = RevokeAndACK_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = RevokeAndACK_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Shutdown_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKShutdown obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Shutdown_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Shutdown_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_Shutdown_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);
-       LDKShutdown ret_var = Shutdown_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = Shutdown_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKUpdateFailHTLC obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UpdateFailHTLC_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UpdateFailHTLC_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_UpdateFailHTLC_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);
-       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = UpdateFailHTLC_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKUpdateFailMalformedHTLC obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UpdateFailMalformedHTLC_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UpdateFailMalformedHTLC_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_UpdateFailMalformedHTLC_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);
-       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = UpdateFailMalformedHTLC_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFee_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKUpdateFee obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UpdateFee_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UpdateFee_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_UpdateFee_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);
-       LDKUpdateFee ret_var = UpdateFee_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = UpdateFee_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKUpdateFulfillHTLC obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UpdateFulfillHTLC_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UpdateFulfillHTLC_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_UpdateFulfillHTLC_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);
-       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = UpdateFulfillHTLC_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKUpdateAddHTLC obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UpdateAddHTLC_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UpdateAddHTLC_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_UpdateAddHTLC_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);
-       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = UpdateAddHTLC_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Ping_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKPing obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Ping_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Ping_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_Ping_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13640,11 +16416,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Pong_1write(JNIEnv *env
        LDKPong obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Pong_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Pong_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_Pong_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13661,11 +16437,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnounce
        LDKUnsignedChannelAnnouncement obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UnsignedChannelAnnouncement_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UnsignedChannelAnnouncement_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_UnsignedChannelAnnouncement_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13682,37 +16458,32 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1wr
        LDKChannelAnnouncement obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelAnnouncement_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelAnnouncement_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_ChannelAnnouncement_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);
-       LDKChannelAnnouncement ret_var = ChannelAnnouncement_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = ChannelAnnouncement_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKUnsignedChannelUpdate obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UnsignedChannelUpdate_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UnsignedChannelUpdate_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_UnsignedChannelUpdate_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13729,37 +16500,32 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1write(JN
        LDKChannelUpdate obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelUpdate_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelUpdate_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_ChannelUpdate_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);
-       LDKChannelUpdate ret_var = ChannelUpdate_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = ChannelUpdate_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKErrorMessage obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ErrorMessage_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ErrorMessage_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_ErrorMessage_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13776,11 +16542,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncemen
        LDKUnsignedNodeAnnouncement obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UnsignedNodeAnnouncement_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_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_UnsignedNodeAnnouncement_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13797,26 +16563,21 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1write
        LDKNodeAnnouncement obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NodeAnnouncement_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = NodeAnnouncement_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_NodeAnnouncement_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);
-       LDKNodeAnnouncement ret_var = NodeAnnouncement_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = NodeAnnouncement_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13833,11 +16594,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1w
        LDKQueryShortChannelIds obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = QueryShortChannelIds_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = QueryShortChannelIds_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_ReplyShortChannelIdsEnd_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13854,11 +16615,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd
        LDKReplyShortChannelIdsEnd obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ReplyShortChannelIdsEnd_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ReplyShortChannelIdsEnd_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_QueryChannelRange_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13875,11 +16636,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1writ
        LDKQueryChannelRange obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = QueryChannelRange_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = QueryChannelRange_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_ReplyChannelRange_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13896,11 +16657,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1writ
        LDKReplyChannelRange obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ReplyChannelRange_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ReplyChannelRange_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_GossipTimestampFilter_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -13917,11 +16678,83 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1
        LDKGossipTimestampFilter obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = GossipTimestampFilter_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = GossipTimestampFilter_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 void JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKIgnoringMessageHandler this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       IgnoringMessageHandler_free(this_ptr_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1new(JNIEnv *env, jclass clz) {
+       LDKIgnoringMessageHandler ret_var = IgnoringMessageHandler_new();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1MessageSendEventsProvider(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKIgnoringMessageHandler this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKMessageSendEventsProvider* ret = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
+       *ret = IgnoringMessageHandler_as_MessageSendEventsProvider(&this_arg_conv);
+       return (long)ret;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1RoutingMessageHandler(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKIgnoringMessageHandler this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKRoutingMessageHandler* ret = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
+       *ret = IgnoringMessageHandler_as_RoutingMessageHandler(&this_arg_conv);
+       return (long)ret;
+}
+
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErroringMessageHandler_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKErroringMessageHandler this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ErroringMessageHandler_free(this_ptr_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErroringMessageHandler_1new(JNIEnv *env, jclass clz) {
+       LDKErroringMessageHandler ret_var = ErroringMessageHandler_new();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErroringMessageHandler_1as_1MessageSendEventsProvider(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKErroringMessageHandler this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKMessageSendEventsProvider* ret = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
+       *ret = ErroringMessageHandler_as_MessageSendEventsProvider(&this_arg_conv);
+       return (long)ret;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ErroringMessageHandler_1as_1ChannelMessageHandler(JNIEnv *env, jclass clz, int64_t this_arg) {
+       LDKErroringMessageHandler this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKChannelMessageHandler* ret = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
+       *ret = ErroringMessageHandler_as_ChannelMessageHandler(&this_arg_conv);
+       return (long)ret;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_MessageHandler_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -14013,20 +16846,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free(JNIEnv *
        PeerHandleError_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKPeerHandleError orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKPeerHandleError ret_var = PeerHandleError_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1get_1no_1connection_1possible(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKPeerHandleError this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14053,6 +16872,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1new(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKPeerHandleError orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKPeerHandleError ret_var = PeerHandleError_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerManager_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKPeerManager this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14095,9 +16928,9 @@ JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_PeerManager_1get_1peer
        jobjectArray ret_arr = (*env)->NewObjectArray(env, ret_var.datalen, arr_of_B_clz, NULL);
        ;
        for (size_t i = 0; i < ret_var.datalen; i++) {
-               int8_tArray arr_conv_8_arr = (*env)->NewByteArray(env, 33);
-               (*env)->SetByteArrayRegion(env, arr_conv_8_arr, 0, 33, ret_var.data[i].compressed_form);
-               (*env)->SetObjectArrayElement(env, ret_arr, i, arr_conv_8_arr);
+               int8_tArray ret_conv_8_arr = (*env)->NewByteArray(env, 33);
+               (*env)->SetByteArrayRegion(env, ret_conv_8_arr, 0, 33, ret_var.data[i].compressed_form);
+               (*env)->SetObjectArrayElement(env, ret_arr, i, ret_conv_8_arr);
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -14195,9 +17028,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_build_1commitment_1secr
        CHECK((*env)->GetArrayLength(env, commitment_seed) == 32);
        (*env)->GetByteArrayRegion(env, commitment_seed, 0, 32, commitment_seed_arr);
        unsigned char (*commitment_seed_ref)[32] = &commitment_seed_arr;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 32, build_commitment_secret(commitment_seed_ref, idx).data);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, build_commitment_secret(commitment_seed_ref, idx).data);
+       return ret_arr;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_derive_1private_1key(JNIEnv *env, jclass clz, int8_tArray per_commitment_point, int8_tArray base_secret) {
@@ -14208,7 +17041,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_derive_1private_1key(JNIEnv
        CHECK((*env)->GetArrayLength(env, base_secret) == 32);
        (*env)->GetByteArrayRegion(env, base_secret, 0, 32, base_secret_arr);
        unsigned char (*base_secret_ref)[32] = &base_secret_arr;
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
        *ret_conv = derive_private_key(per_commitment_point_ref, base_secret_ref);
        return (long)ret_conv;
 }
@@ -14220,7 +17053,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_derive_1public_1key(JNIEnv
        LDKPublicKey base_point_ref;
        CHECK((*env)->GetArrayLength(env, base_point) == 33);
        (*env)->GetByteArrayRegion(env, base_point, 0, 33, base_point_ref.compressed_form);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
        *ret_conv = derive_public_key(per_commitment_point_ref, base_point_ref);
        return (long)ret_conv;
 }
@@ -14234,7 +17067,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_derive_1private_1revocation
        CHECK((*env)->GetArrayLength(env, countersignatory_revocation_base_secret) == 32);
        (*env)->GetByteArrayRegion(env, countersignatory_revocation_base_secret, 0, 32, countersignatory_revocation_base_secret_arr);
        unsigned char (*countersignatory_revocation_base_secret_ref)[32] = &countersignatory_revocation_base_secret_arr;
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
        *ret_conv = derive_private_revocation_key(per_commitment_secret_ref, countersignatory_revocation_base_secret_ref);
        return (long)ret_conv;
 }
@@ -14246,7 +17079,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_derive_1public_1revocation_
        LDKPublicKey countersignatory_revocation_base_point_ref;
        CHECK((*env)->GetArrayLength(env, countersignatory_revocation_base_point) == 33);
        (*env)->GetByteArrayRegion(env, countersignatory_revocation_base_point, 0, 33, countersignatory_revocation_base_point_ref.compressed_form);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
        *ret_conv = derive_public_revocation_key(per_commitment_point_ref, countersignatory_revocation_base_point_ref);
        return (long)ret_conv;
 }
@@ -14258,27 +17091,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1free(JNIEnv *e
        TxCreationKeys_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKTxCreationKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKTxCreationKeys ret_var = TxCreationKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, TxCreationKeys_get_per_commitment_point(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TxCreationKeys_get_per_commitment_point(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1per_1commitment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -14295,9 +17114,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1re
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, TxCreationKeys_get_revocation_key(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TxCreationKeys_get_revocation_key(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1revocation_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -14314,9 +17133,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1br
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, TxCreationKeys_get_broadcaster_htlc_key(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TxCreationKeys_get_broadcaster_htlc_key(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1broadcaster_1htlc_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -14333,9 +17152,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1co
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, TxCreationKeys_get_countersignatory_htlc_key(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TxCreationKeys_get_countersignatory_htlc_key(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1countersignatory_1htlc_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -14352,9 +17171,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1get_1br
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, TxCreationKeys_get_broadcaster_delayed_payment_key(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, TxCreationKeys_get_broadcaster_delayed_payment_key(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1broadcaster_1delayed_1payment_1key(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -14393,30 +17212,39 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1new(JNIEnv
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKTxCreationKeys orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKTxCreationKeys ret_var = TxCreationKeys_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKTxCreationKeys obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = TxCreationKeys_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = TxCreationKeys_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_TxCreationKeys_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);
-       LDKTxCreationKeys ret_var = TxCreationKeys_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = TxCreationKeys_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -14426,27 +17254,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1free(JNIEnv
        ChannelPublicKeys_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelPublicKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelPublicKeys ret_var = ChannelPublicKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, ChannelPublicKeys_get_funding_pubkey(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, ChannelPublicKeys_get_funding_pubkey(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1funding_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -14463,9 +17277,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, ChannelPublicKeys_get_revocation_basepoint(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, ChannelPublicKeys_get_revocation_basepoint(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1revocation_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -14482,9 +17296,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, ChannelPublicKeys_get_payment_point(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, ChannelPublicKeys_get_payment_point(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1payment_1point(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -14501,9 +17315,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, ChannelPublicKeys_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, ChannelPublicKeys_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1delayed_1payment_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -14520,9 +17334,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1get_
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, ChannelPublicKeys_get_htlc_basepoint(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, ChannelPublicKeys_get_htlc_basepoint(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1htlc_1basepoint(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -14561,30 +17375,39 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1new(JNIE
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelPublicKeys orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelPublicKeys ret_var = ChannelPublicKeys_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelPublicKeys obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelPublicKeys_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelPublicKeys_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_ChannelPublicKeys_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);
-       LDKChannelPublicKeys ret_var = ChannelPublicKeys_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = ChannelPublicKeys_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1derive_1new(JNIEnv *env, jclass clz, int8_tArray per_commitment_point, int8_tArray broadcaster_delayed_payment_base, int8_tArray broadcaster_htlc_base, int8_tArray countersignatory_revocation_base, int8_tArray countersignatory_htlc_base) {
@@ -14603,7 +17426,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1derive_1new
        LDKPublicKey countersignatory_htlc_base_ref;
        CHECK((*env)->GetArrayLength(env, countersignatory_htlc_base) == 33);
        (*env)->GetByteArrayRegion(env, countersignatory_htlc_base, 0, 33, countersignatory_htlc_base_ref.compressed_form);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
        *ret_conv = TxCreationKeys_derive_new(per_commitment_point_ref, broadcaster_delayed_payment_base_ref, broadcaster_htlc_base_ref, countersignatory_revocation_base_ref, countersignatory_htlc_base_ref);
        return (long)ret_conv;
 }
@@ -14618,7 +17441,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1from_1chann
        LDKChannelPublicKeys countersignatory_keys_conv;
        countersignatory_keys_conv.inner = (void*)(countersignatory_keys & (~1));
        countersignatory_keys_conv.is_owned = false;
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
        *ret_conv = TxCreationKeys_from_channel_static_keys(per_commitment_point_ref, &broadcaster_keys_conv, &countersignatory_keys_conv);
        return (long)ret_conv;
 }
@@ -14630,11 +17453,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_get_1revokeable_1redeem
        LDKPublicKey broadcaster_delayed_payment_key_ref;
        CHECK((*env)->GetArrayLength(env, broadcaster_delayed_payment_key) == 33);
        (*env)->GetByteArrayRegion(env, broadcaster_delayed_payment_key, 0, 33, broadcaster_delayed_payment_key_ref.compressed_form);
-       LDKCVec_u8Z arg_var = get_revokeable_redeemscript(revocation_key_ref, contest_delay, broadcaster_delayed_payment_key_ref);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = get_revokeable_redeemscript(revocation_key_ref, contest_delay, broadcaster_delayed_payment_key_ref);
+       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_HTLCOutputInCommitment_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -14644,20 +17467,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1free(J
        HTLCOutputInCommitment_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKHTLCOutputInCommitment orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1get_1offered(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKHTLCOutputInCommitment this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14722,30 +17531,39 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1p
        HTLCOutputInCommitment_set_payment_hash(&this_ptr_conv, val_ref);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKHTLCOutputInCommitment orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHTLCOutputInCommitment obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = HTLCOutputInCommitment_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = HTLCOutputInCommitment_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_HTLCOutputInCommitment_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);
-       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = HTLCOutputInCommitment_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_get_1htlc_1redeemscript(JNIEnv *env, jclass clz, int64_t htlc, int64_t keys) {
@@ -14755,11 +17573,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_get_1htlc_1redeemscript
        LDKTxCreationKeys keys_conv;
        keys_conv.inner = (void*)(keys & (~1));
        keys_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = get_htlc_redeemscript(&htlc_conv, &keys_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = get_htlc_redeemscript(&htlc_conv, &keys_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_make_1funding_1redeemscript(JNIEnv *env, jclass clz, int8_tArray broadcaster, int8_tArray countersignatory) {
@@ -14769,11 +17587,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_make_1funding_1redeemsc
        LDKPublicKey countersignatory_ref;
        CHECK((*env)->GetArrayLength(env, countersignatory) == 33);
        (*env)->GetByteArrayRegion(env, countersignatory, 0, 33, countersignatory_ref.compressed_form);
-       LDKCVec_u8Z arg_var = make_funding_redeemscript(broadcaster_ref, countersignatory_ref);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = make_funding_redeemscript(broadcaster_ref, countersignatory_ref);
+       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_build_1htlc_1transaction(JNIEnv *env, jclass clz, int8_tArray prev_hash, int32_t feerate_per_kw, int16_t contest_delay, int64_t htlc, int8_tArray broadcaster_delayed_payment_key, int8_tArray revocation_key) {
@@ -14790,11 +17608,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_build_1htlc_1transactio
        LDKPublicKey revocation_key_ref;
        CHECK((*env)->GetArrayLength(env, revocation_key) == 33);
        (*env)->GetByteArrayRegion(env, revocation_key, 0, 33, revocation_key_ref.compressed_form);
-       LDKTransaction arg_var = build_htlc_transaction(prev_hash_ref, feerate_per_kw, contest_delay, &htlc_conv, broadcaster_delayed_payment_key_ref, revocation_key_ref);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       Transaction_free(arg_var);
-       return arg_arr;
+       LDKTransaction ret_var = build_htlc_transaction(prev_hash_ref, feerate_per_kw, contest_delay, &htlc_conv, broadcaster_delayed_payment_key_ref, revocation_key_ref);
+       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 void JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -14804,20 +17622,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1
        ChannelTransactionParameters_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKChannelTransactionParameters orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1get_1holder_1pubkeys(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKChannelTransactionParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14945,19 +17749,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameter
        }
        return ret_ref;
 }
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKCounterpartyChannelTransactionParameters this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       CounterpartyChannelTransactionParameters_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKCounterpartyChannelTransactionParameters orig_conv;
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelTransactionParameters orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_clone(&orig_conv);
+       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -14967,6 +17764,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransact
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKCounterpartyChannelTransactionParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       CounterpartyChannelTransactionParameters_free(this_ptr_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1get_1pubkeys(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKCounterpartyChannelTransactionParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15022,6 +17826,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransact
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKCounterpartyChannelTransactionParameters orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1is_1populated(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKChannelTransactionParameters this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -15062,52 +17880,42 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTran
        LDKCounterpartyChannelTransactionParameters obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = CounterpartyChannelTransactionParameters_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = CounterpartyChannelTransactionParameters_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_CounterpartyChannelTransactionParameters_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);
-       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CounterpartyChannelTransactionParameters_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelTransactionParameters obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelTransactionParameters_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelTransactionParameters_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_ChannelTransactionParameters_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);
-       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = ChannelTransactionParameters_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectedChannelTransactionParameters_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -15182,27 +17990,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1f
        HolderCommitmentTransaction_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKHolderCommitmentTransaction orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1get_1counterparty_1sig(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKHolderCommitmentTransaction this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, HolderCommitmentTransaction_get_counterparty_sig(&this_ptr_conv).compact_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, HolderCommitmentTransaction_get_counterparty_sig(&this_ptr_conv).compact_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1counterparty_1sig(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -15226,39 +18020,48 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1s
        else
                val_constr.data = NULL;
        for (size_t i = 0; i < val_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, val, i);
-               LDKSignature arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
-               val_constr.data[i] = arr_conv_8_ref;
+               int8_tArray val_conv_8 = (*env)->GetObjectArrayElement(env, val, i);
+               LDKSignature val_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, val_conv_8) == 64);
+               (*env)->GetByteArrayRegion(env, val_conv_8, 0, 64, val_conv_8_ref.compact_form);
+               val_constr.data[i] = val_conv_8_ref;
        }
        HolderCommitmentTransaction_set_counterparty_htlc_sigs(&this_ptr_conv, val_constr);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKHolderCommitmentTransaction orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKHolderCommitmentTransaction obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = HolderCommitmentTransaction_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = HolderCommitmentTransaction_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_HolderCommitmentTransaction_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);
-       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = HolderCommitmentTransaction_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1new(JNIEnv *env, jclass clz, int64_t commitment_tx, int8_tArray counterparty_sig, jobjectArray counterparty_htlc_sigs, int8_tArray holder_funding_key, int8_tArray counterparty_funding_key) {
@@ -15276,11 +18079,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction
        else
                counterparty_htlc_sigs_constr.data = NULL;
        for (size_t i = 0; i < counterparty_htlc_sigs_constr.datalen; i++) {
-               int8_tArray arr_conv_8 = (*env)->GetObjectArrayElement(env, counterparty_htlc_sigs, i);
-               LDKSignature arr_conv_8_ref;
-               CHECK((*env)->GetArrayLength(env, arr_conv_8) == 64);
-               (*env)->GetByteArrayRegion(env, arr_conv_8, 0, 64, arr_conv_8_ref.compact_form);
-               counterparty_htlc_sigs_constr.data[i] = arr_conv_8_ref;
+               int8_tArray counterparty_htlc_sigs_conv_8 = (*env)->GetObjectArrayElement(env, counterparty_htlc_sigs, i);
+               LDKSignature counterparty_htlc_sigs_conv_8_ref;
+               CHECK((*env)->GetArrayLength(env, counterparty_htlc_sigs_conv_8) == 64);
+               (*env)->GetByteArrayRegion(env, counterparty_htlc_sigs_conv_8, 0, 64, counterparty_htlc_sigs_conv_8_ref.compact_form);
+               counterparty_htlc_sigs_constr.data[i] = counterparty_htlc_sigs_conv_8_ref;
        }
        LDKPublicKey holder_funding_key_ref;
        CHECK((*env)->GetArrayLength(env, holder_funding_key) == 33);
@@ -15305,29 +18108,15 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1fr
        BuiltCommitmentTransaction_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKBuiltCommitmentTransaction orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1get_1transaction(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKBuiltCommitmentTransaction this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       LDKTransaction arg_var = BuiltCommitmentTransaction_get_transaction(&this_ptr_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       Transaction_free(arg_var);
-       return arg_arr;
+       LDKTransaction ret_var = BuiltCommitmentTransaction_get_transaction(&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);
+       Transaction_free(ret_var);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1set_1transaction(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -15380,30 +18169,39 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKBuiltCommitmentTransaction orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKBuiltCommitmentTransaction obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = BuiltCommitmentTransaction_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = BuiltCommitmentTransaction_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_BuiltCommitmentTransaction_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);
-       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = BuiltCommitmentTransaction_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1get_1sighash_1all(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray funding_redeemscript, int64_t channel_value_satoshis) {
@@ -15413,10 +18211,10 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransact
        LDKu8slice funding_redeemscript_ref;
        funding_redeemscript_ref.datalen = (*env)->GetArrayLength(env, funding_redeemscript);
        funding_redeemscript_ref.data = (*env)->GetByteArrayElements (env, funding_redeemscript, NULL);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 32, BuiltCommitmentTransaction_get_sighash_all(&this_arg_conv, funding_redeemscript_ref, channel_value_satoshis).data);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, BuiltCommitmentTransaction_get_sighash_all(&this_arg_conv, funding_redeemscript_ref, channel_value_satoshis).data);
        (*env)->ReleaseByteArrayElements(env, funding_redeemscript, (int8_t*)funding_redeemscript_ref.data, 0);
-       return arg_arr;
+       return ret_arr;
 }
 
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1sign(JNIEnv *env, jclass clz, int64_t this_arg, int8_tArray funding_key, int8_tArray funding_redeemscript, int64_t channel_value_satoshis) {
@@ -15430,10 +18228,10 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransact
        LDKu8slice funding_redeemscript_ref;
        funding_redeemscript_ref.datalen = (*env)->GetArrayLength(env, funding_redeemscript);
        funding_redeemscript_ref.data = (*env)->GetByteArrayElements (env, funding_redeemscript, NULL);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 64);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 64, BuiltCommitmentTransaction_sign(&this_arg_conv, funding_key_ref, funding_redeemscript_ref, channel_value_satoshis).compact_form);
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 64);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 64, BuiltCommitmentTransaction_sign(&this_arg_conv, funding_key_ref, funding_redeemscript_ref, channel_value_satoshis).compact_form);
        (*env)->ReleaseByteArrayElements(env, funding_redeemscript, (int8_t*)funding_redeemscript_ref.data, 0);
-       return arg_arr;
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentTransaction_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -15461,26 +18259,21 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_CommitmentTransaction_1
        LDKCommitmentTransaction obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = CommitmentTransaction_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = CommitmentTransaction_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_CommitmentTransaction_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);
-       LDKCommitmentTransaction ret_var = CommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CommitmentTransaction_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_CommitmentTransaction_1commitment_1number(JNIEnv *env, jclass clz, int64_t this_arg) {
@@ -15558,9 +18351,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_TrustedCommitmentTransa
        LDKTrustedCommitmentTransaction this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 32);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 32, TrustedCommitmentTransaction_txid(&this_arg_conv).data);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 32);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 32, TrustedCommitmentTransaction_txid(&this_arg_conv).data);
+       return ret_arr;
 }
 
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_TrustedCommitmentTransaction_1built_1transaction(JNIEnv *env, jclass clz, int64_t this_arg) {
@@ -15618,6 +18411,48 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_get_1commitment_1transactio
        return ret_val;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKInitFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKInitFeatures ret_var = InitFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNodeFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeFeatures ret_var = NodeFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelFeatures ret_var = ChannelFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InitFeatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKInitFeatures this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15632,11 +18467,140 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1free(JNIEnv *env
        NodeFeatures_free(this_ptr_conv);
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKChannelFeatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelFeatures_free(this_ptr_conv);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKChannelFeatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelFeatures_free(this_ptr_conv);
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1empty(JNIEnv *env, jclass clz) {
+       LDKInitFeatures ret_var = InitFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_InitFeatures_1known(JNIEnv *env, jclass clz) {
+       LDKInitFeatures ret_var = InitFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1empty(JNIEnv *env, jclass clz) {
+       LDKNodeFeatures ret_var = NodeFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1known(JNIEnv *env, jclass clz) {
+       LDKNodeFeatures ret_var = NodeFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1empty(JNIEnv *env, jclass clz) {
+       LDKChannelFeatures ret_var = ChannelFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1known(JNIEnv *env, jclass clz) {
+       LDKChannelFeatures ret_var = ChannelFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_InitFeatures_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKInitFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = InitFeatures_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_NodeFeatures_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKNodeFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = NodeFeatures_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_ChannelFeatures_1write(JNIEnv *env, jclass clz, int64_t obj) {
+       LDKChannelFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = ChannelFeatures_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_InitFeatures_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_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = InitFeatures_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeFeatures_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_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = NodeFeatures_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return (long)ret_conv;
+}
+
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_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_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = ChannelFeatures_read(ser_ref);
+       (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -15646,27 +18610,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free(JNIEnv *env, jc
        RouteHop_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHop_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKRouteHop orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRouteHop ret_var = RouteHop_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RouteHop_1get_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKRouteHop this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, RouteHop_get_pubkey(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, RouteHop_get_pubkey(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1pubkey(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -15700,7 +18650,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1node_1features(
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        RouteHop_set_node_features(&this_ptr_conv, val_conv);
 }
 
@@ -15740,7 +18690,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1set_1channel_1featur
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        RouteHop_set_channel_features(&this_ptr_conv, val_conv);
 }
 
@@ -15781,11 +18731,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHop_1new(JNIEnv *env,
        LDKNodeFeatures node_features_arg_conv;
        node_features_arg_conv.inner = (void*)(node_features_arg & (~1));
        node_features_arg_conv.is_owned = (node_features_arg & 1) || (node_features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       node_features_arg_conv = NodeFeatures_clone(&node_features_arg_conv);
        LDKChannelFeatures channel_features_arg_conv;
        channel_features_arg_conv.inner = (void*)(channel_features_arg & (~1));
        channel_features_arg_conv.is_owned = (channel_features_arg & 1) || (channel_features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       channel_features_arg_conv = ChannelFeatures_clone(&channel_features_arg_conv);
        LDKRouteHop ret_var = RouteHop_new(pubkey_arg_ref, node_features_arg_conv, short_channel_id_arg, channel_features_arg_conv, fee_msat_arg, cltv_expiry_delta_arg);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
@@ -15796,18 +18746,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHop_1new(JNIEnv *env,
        return ret_ref;
 }
 
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKRoute this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Route_free(this_ptr_conv);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Route_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKRoute orig_conv;
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHop_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRouteHop orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKRoute ret_var = Route_clone(&orig_conv);
+       LDKRouteHop ret_var = RouteHop_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -15817,6 +18760,13 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Route_1clone(JNIEnv *env, j
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
+       LDKRoute this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Route_free(this_ptr_conv);
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1set_1paths(JNIEnv *env, jclass clz, int64_t this_ptr, jobjectArray val) {
        LDKRoute this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15828,24 +18778,24 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1set_1paths(JNIEnv *env,
        else
                val_constr.data = NULL;
        for (size_t m = 0; m < val_constr.datalen; m++) {
-               int64_tArray arr_conv_12 = (*env)->GetObjectArrayElement(env, val, m);
-               LDKCVec_RouteHopZ arr_conv_12_constr;
-               arr_conv_12_constr.datalen = (*env)->GetArrayLength(env, arr_conv_12);
-               if (arr_conv_12_constr.datalen > 0)
-                       arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+               int64_tArray val_conv_12 = (*env)->GetObjectArrayElement(env, val, m);
+               LDKCVec_RouteHopZ val_conv_12_constr;
+               val_conv_12_constr.datalen = (*env)->GetArrayLength(env, val_conv_12);
+               if (val_conv_12_constr.datalen > 0)
+                       val_conv_12_constr.data = MALLOC(val_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
                else
-                       arr_conv_12_constr.data = NULL;
-               int64_t* arr_conv_12_vals = (*env)->GetLongArrayElements (env, arr_conv_12, NULL);
-               for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
-                       int64_t arr_conv_10 = arr_conv_12_vals[k];
-                       LDKRouteHop arr_conv_10_conv;
-                       arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-                       arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-                       arr_conv_10_conv = RouteHop_clone(&arr_conv_10_conv);
-                       arr_conv_12_constr.data[k] = arr_conv_10_conv;
+                       val_conv_12_constr.data = NULL;
+               int64_t* val_conv_12_vals = (*env)->GetLongArrayElements (env, val_conv_12, NULL);
+               for (size_t k = 0; k < val_conv_12_constr.datalen; k++) {
+                       int64_t val_conv_12_conv_10 = val_conv_12_vals[k];
+                       LDKRouteHop val_conv_12_conv_10_conv;
+                       val_conv_12_conv_10_conv.inner = (void*)(val_conv_12_conv_10 & (~1));
+                       val_conv_12_conv_10_conv.is_owned = (val_conv_12_conv_10 & 1) || (val_conv_12_conv_10 == 0);
+                       val_conv_12_conv_10_conv = RouteHop_clone(&val_conv_12_conv_10_conv);
+                       val_conv_12_constr.data[k] = val_conv_12_conv_10_conv;
                }
-               (*env)->ReleaseLongArrayElements(env, arr_conv_12, arr_conv_12_vals, 0);
-               val_constr.data[m] = arr_conv_12_constr;
+               (*env)->ReleaseLongArrayElements(env, val_conv_12, val_conv_12_vals, 0);
+               val_constr.data[m] = val_conv_12_constr;
        }
        Route_set_paths(&this_ptr_conv, val_constr);
 }
@@ -15858,24 +18808,24 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Route_1new(JNIEnv *env, jcl
        else
                paths_arg_constr.data = NULL;
        for (size_t m = 0; m < paths_arg_constr.datalen; m++) {
-               int64_tArray arr_conv_12 = (*env)->GetObjectArrayElement(env, paths_arg, m);
-               LDKCVec_RouteHopZ arr_conv_12_constr;
-               arr_conv_12_constr.datalen = (*env)->GetArrayLength(env, arr_conv_12);
-               if (arr_conv_12_constr.datalen > 0)
-                       arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+               int64_tArray paths_arg_conv_12 = (*env)->GetObjectArrayElement(env, paths_arg, m);
+               LDKCVec_RouteHopZ paths_arg_conv_12_constr;
+               paths_arg_conv_12_constr.datalen = (*env)->GetArrayLength(env, paths_arg_conv_12);
+               if (paths_arg_conv_12_constr.datalen > 0)
+                       paths_arg_conv_12_constr.data = MALLOC(paths_arg_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
                else
-                       arr_conv_12_constr.data = NULL;
-               int64_t* arr_conv_12_vals = (*env)->GetLongArrayElements (env, arr_conv_12, NULL);
-               for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
-                       int64_t arr_conv_10 = arr_conv_12_vals[k];
-                       LDKRouteHop arr_conv_10_conv;
-                       arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-                       arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-                       arr_conv_10_conv = RouteHop_clone(&arr_conv_10_conv);
-                       arr_conv_12_constr.data[k] = arr_conv_10_conv;
+                       paths_arg_conv_12_constr.data = NULL;
+               int64_t* paths_arg_conv_12_vals = (*env)->GetLongArrayElements (env, paths_arg_conv_12, NULL);
+               for (size_t k = 0; k < paths_arg_conv_12_constr.datalen; k++) {
+                       int64_t paths_arg_conv_12_conv_10 = paths_arg_conv_12_vals[k];
+                       LDKRouteHop paths_arg_conv_12_conv_10_conv;
+                       paths_arg_conv_12_conv_10_conv.inner = (void*)(paths_arg_conv_12_conv_10 & (~1));
+                       paths_arg_conv_12_conv_10_conv.is_owned = (paths_arg_conv_12_conv_10 & 1) || (paths_arg_conv_12_conv_10 == 0);
+                       paths_arg_conv_12_conv_10_conv = RouteHop_clone(&paths_arg_conv_12_conv_10_conv);
+                       paths_arg_conv_12_constr.data[k] = paths_arg_conv_12_conv_10_conv;
                }
-               (*env)->ReleaseLongArrayElements(env, arr_conv_12, arr_conv_12_vals, 0);
-               paths_arg_constr.data[m] = arr_conv_12_constr;
+               (*env)->ReleaseLongArrayElements(env, paths_arg_conv_12, paths_arg_conv_12_vals, 0);
+               paths_arg_constr.data[m] = paths_arg_conv_12_constr;
        }
        LDKRoute ret_var = Route_new(paths_arg_constr);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -15887,15 +18837,29 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Route_1new(JNIEnv *env, jcl
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_Route_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRoute orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRoute ret_var = Route_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_Route_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKRoute obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Route_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Route_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_Route_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -15915,27 +18879,13 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1free(JNIEnv *env, j
        RouteHint_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKRouteHint orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRouteHint ret_var = RouteHint_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1src_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKRouteHint this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, RouteHint_get_src_node_id(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, RouteHint_get_src_node_id(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1src_1node_1id(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -16003,30 +18953,11 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1cltv_1expiry_1
        RouteHint_set_cltv_expiry_delta(&this_ptr_conv, val);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
-       LDKRouteHint this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = false;
-       int64_t ret_val = RouteHint_get_htlc_minimum_msat(&this_ptr_conv);
-       return ret_val;
-}
-
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_1msat(JNIEnv *env, jclass clz, int64_t this_ptr, int64_t val) {
-       LDKRouteHint this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = false;
-       RouteHint_set_htlc_minimum_msat(&this_ptr_conv, val);
-}
-
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1new(JNIEnv *env, jclass clz, int8_tArray src_node_id_arg, int64_t short_channel_id_arg, int64_t fees_arg, int16_t cltv_expiry_delta_arg, int64_t htlc_minimum_msat_arg) {
-       LDKPublicKey src_node_id_arg_ref;
-       CHECK((*env)->GetArrayLength(env, src_node_id_arg) == 33);
-       (*env)->GetByteArrayRegion(env, src_node_id_arg, 0, 33, src_node_id_arg_ref.compressed_form);
-       LDKRoutingFees fees_arg_conv;
-       fees_arg_conv.inner = (void*)(fees_arg & (~1));
-       fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
-       fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
-       LDKRouteHint ret_var = RouteHint_new(src_node_id_arg_ref, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRouteHint orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRouteHint ret_var = RouteHint_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -16036,16 +18967,16 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RouteHint_1new(JNIEnv *env,
        return ret_ref;
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_get_1route(JNIEnv *env, jclass clz, int8_tArray our_node_id, int64_t network, int8_tArray target, int64_tArray first_hops, int64_tArray last_hops, int64_t final_value_msat, int32_t final_cltv, int64_t logger) {
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_get_1route(JNIEnv *env, jclass clz, int8_tArray our_node_id, int64_t network, int8_tArray payee, int64_tArray first_hops, int64_tArray last_hops, int64_t final_value_msat, int32_t final_cltv, int64_t logger) {
        LDKPublicKey our_node_id_ref;
        CHECK((*env)->GetArrayLength(env, our_node_id) == 33);
        (*env)->GetByteArrayRegion(env, our_node_id, 0, 33, our_node_id_ref.compressed_form);
        LDKNetworkGraph network_conv;
        network_conv.inner = (void*)(network & (~1));
        network_conv.is_owned = false;
-       LDKPublicKey target_ref;
-       CHECK((*env)->GetArrayLength(env, target) == 33);
-       (*env)->GetByteArrayRegion(env, target, 0, 33, target_ref.compressed_form);
+       LDKPublicKey payee_ref;
+       CHECK((*env)->GetArrayLength(env, payee) == 33);
+       (*env)->GetByteArrayRegion(env, payee, 0, 33, payee_ref.compressed_form);
        LDKCVec_ChannelDetailsZ first_hops_constr;
        first_hops_constr.datalen = (*env)->GetArrayLength(env, first_hops);
        if (first_hops_constr.datalen > 0)
@@ -16054,11 +18985,11 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_get_1route(JNIEnv *env, jcl
                first_hops_constr.data = NULL;
        int64_t* first_hops_vals = (*env)->GetLongArrayElements (env, first_hops, NULL);
        for (size_t q = 0; q < first_hops_constr.datalen; q++) {
-               int64_t arr_conv_16 = first_hops_vals[q];
-               LDKChannelDetails arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               first_hops_constr.data[q] = arr_conv_16_conv;
+               int64_t first_hops_conv_16 = first_hops_vals[q];
+               LDKChannelDetails first_hops_conv_16_conv;
+               first_hops_conv_16_conv.inner = (void*)(first_hops_conv_16 & (~1));
+               first_hops_conv_16_conv.is_owned = (first_hops_conv_16 & 1) || (first_hops_conv_16 == 0);
+               first_hops_constr.data[q] = first_hops_conv_16_conv;
        }
        (*env)->ReleaseLongArrayElements(env, first_hops, first_hops_vals, 0);
        LDKCVec_RouteHintZ last_hops_constr;
@@ -16069,12 +19000,12 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_get_1route(JNIEnv *env, jcl
                last_hops_constr.data = NULL;
        int64_t* last_hops_vals = (*env)->GetLongArrayElements (env, last_hops, NULL);
        for (size_t l = 0; l < last_hops_constr.datalen; l++) {
-               int64_t arr_conv_11 = last_hops_vals[l];
-               LDKRouteHint arr_conv_11_conv;
-               arr_conv_11_conv.inner = (void*)(arr_conv_11 & (~1));
-               arr_conv_11_conv.is_owned = (arr_conv_11 & 1) || (arr_conv_11 == 0);
-               arr_conv_11_conv = RouteHint_clone(&arr_conv_11_conv);
-               last_hops_constr.data[l] = arr_conv_11_conv;
+               int64_t last_hops_conv_11 = last_hops_vals[l];
+               LDKRouteHint last_hops_conv_11_conv;
+               last_hops_conv_11_conv.inner = (void*)(last_hops_conv_11 & (~1));
+               last_hops_conv_11_conv.is_owned = (last_hops_conv_11 & 1) || (last_hops_conv_11 == 0);
+               last_hops_conv_11_conv = RouteHint_clone(&last_hops_conv_11_conv);
+               last_hops_constr.data[l] = last_hops_conv_11_conv;
        }
        (*env)->ReleaseLongArrayElements(env, last_hops, last_hops_vals, 0);
        LDKLogger logger_conv = *(LDKLogger*)(((uint64_t)logger) & ~1);
@@ -16083,7 +19014,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_get_1route(JNIEnv *env, jcl
                LDKLogger_JCalls_clone(logger_conv.this_arg);
        }
        LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
-       *ret_conv = get_route(our_node_id_ref, &network_conv, target_ref, &first_hops_constr, last_hops_constr, final_value_msat, final_cltv, logger_conv);
+       *ret_conv = get_route(our_node_id_ref, &network_conv, payee_ref, &first_hops_constr, last_hops_constr, final_value_msat, final_cltv, logger_conv);
        FREE(first_hops_constr.data);
        return (long)ret_conv;
 }
@@ -16095,6 +19026,20 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1free(JNIEnv *env
        NetworkGraph_free(this_ptr_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNetworkGraph orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNetworkGraph ret_var = NetworkGraph_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LockedNetworkGraph_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKLockedNetworkGraph this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16139,7 +19084,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1from_1n
        LDKNetworkGraph network_graph_conv;
        network_graph_conv.inner = (void*)(network_graph & (~1));
        network_graph_conv.is_owned = (network_graph & 1) || (network_graph == 0);
-       // Warning: we need a move here but no clone is available for LDKNetworkGraph
+       network_graph_conv = NetworkGraph_clone(&network_graph_conv);
        LDKNetGraphMsgHandler ret_var = NetGraphMsgHandler_from_net_graph(chain_access_conv, logger_conv, network_graph_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
@@ -16150,6 +19095,14 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1from_1n
        return ret_ref;
 }
 
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1add_1chain_1access(JNIEnv *env, jclass clz, int64_t this_arg, int64_t chain_access) {
+       LDKNetGraphMsgHandler this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKAccess* chain_access_conv = (LDKAccess*)chain_access;
+       NetGraphMsgHandler_add_chain_access(&this_arg_conv, chain_access_conv);
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1read_1locked_1graph(JNIEnv *env, jclass clz, int64_t this_arg) {
        LDKNetGraphMsgHandler this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -16203,20 +19156,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1free(J
        DirectionalChannelInfo_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKDirectionalChannelInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1last_1update(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKDirectionalChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16327,30 +19266,39 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1l
        DirectionalChannelInfo_set_last_update_message(&this_ptr_conv, val_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKDirectionalChannelInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKDirectionalChannelInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = DirectionalChannelInfo_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = DirectionalChannelInfo_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_DirectionalChannelInfo_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);
-       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = DirectionalChannelInfo_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -16381,7 +19329,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1features(JNI
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        ChannelInfo_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -16389,9 +19337,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_
        LDKChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, ChannelInfo_get_node_one(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, ChannelInfo_get_node_one(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1node_1one(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -16433,9 +19381,9 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1node_
        LDKChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = (*env)->NewByteArray(env, 33);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, 33, ChannelInfo_get_node_two(&this_ptr_conv).compressed_form);
-       return arg_arr;
+       int8_tArray ret_arr = (*env)->NewByteArray(env, 33);
+       (*env)->SetByteArrayRegion(env, ret_arr, 0, 33, ChannelInfo_get_node_two(&this_ptr_conv).compressed_form);
+       return ret_arr;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1node_1two(JNIEnv *env, jclass clz, int64_t this_ptr, int8_tArray val) {
@@ -16498,30 +19446,39 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1announcement
        ChannelInfo_set_announcement_message(&this_ptr_conv, val_conv);
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKChannelInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelInfo ret_var = ChannelInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKChannelInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelInfo_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelInfo_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_ChannelInfo_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);
-       LDKChannelInfo ret_var = ChannelInfo_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = ChannelInfo_read(ser_ref);
        (*env)->ReleaseByteArrayElements(env, ser, (int8_t*)ser_ref.data, 0);
-       return ret_ref;
+       return (long)ret_conv;
 }
 
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -16531,20 +19488,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1free(JNIEnv *env,
        RoutingFees_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingFees_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKRoutingFees orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRoutingFees ret_var = RoutingFees_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int32_t JNICALL Java_org_ldk_impl_bindings_RoutingFees_1get_1base_1msat(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKRoutingFees this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16586,6 +19529,20 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingFees_1new(JNIEnv *en
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingFees_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKRoutingFees orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRoutingFees ret_var = RoutingFees_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_RoutingFees_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = (*env)->GetArrayLength(env, ser);
@@ -16600,11 +19557,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_RoutingFees_1write(JNIE
        LDKRoutingFees obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = RoutingFees_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = RoutingFees_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 void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free(JNIEnv *env, jclass clz, int64_t this_ptr) {
@@ -16614,20 +19571,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free(JNI
        NodeAnnouncementInfo_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKNodeAnnouncementInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKNodeAnnouncementInfo ret_var = NodeAnnouncementInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1get_1features(JNIEnv *env, jclass clz, int64_t this_ptr) {
        LDKNodeAnnouncementInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16649,7 +19592,7 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1fea
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        NodeAnnouncementInfo_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -16718,10 +19661,10 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1add
                val_constr.data = NULL;
        int64_t* val_vals = (*env)->GetLongArrayElements (env, val, NULL);
        for (size_t m = 0; m < val_constr.datalen; m++) {
-               int64_t arr_conv_12 = val_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               val_constr.data[m] = arr_conv_12_conv;
+               int64_t val_conv_12 = val_vals[m];
+               LDKNetAddress val_conv_12_conv = *(LDKNetAddress*)(((uint64_t)val_conv_12) & ~1);
+               FREE((void*)val_conv_12);
+               val_constr.data[m] = val_conv_12_conv;
        }
        (*env)->ReleaseLongArrayElements(env, val, val_vals, 0);
        NodeAnnouncementInfo_set_addresses(&this_ptr_conv, val_constr);
@@ -16756,7 +19699,7 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new(J
        LDKNodeFeatures features_arg_conv;
        features_arg_conv.inner = (void*)(features_arg & (~1));
        features_arg_conv.is_owned = (features_arg & 1) || (features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       features_arg_conv = NodeFeatures_clone(&features_arg_conv);
        LDKThreeBytes rgb_arg_ref;
        CHECK((*env)->GetArrayLength(env, rgb_arg) == 3);
        (*env)->GetByteArrayRegion(env, rgb_arg, 0, 3, rgb_arg_ref.data);
@@ -16771,10 +19714,10 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new(J
                addresses_arg_constr.data = NULL;
        int64_t* addresses_arg_vals = (*env)->GetLongArrayElements (env, addresses_arg, NULL);
        for (size_t m = 0; m < addresses_arg_constr.datalen; m++) {
-               int64_t arr_conv_12 = addresses_arg_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               addresses_arg_constr.data[m] = arr_conv_12_conv;
+               int64_t addresses_arg_conv_12 = addresses_arg_vals[m];
+               LDKNetAddress addresses_arg_conv_12_conv = *(LDKNetAddress*)(((uint64_t)addresses_arg_conv_12) & ~1);
+               FREE((void*)addresses_arg_conv_12);
+               addresses_arg_constr.data[m] = addresses_arg_conv_12_conv;
        }
        (*env)->ReleaseLongArrayElements(env, addresses_arg, addresses_arg_vals, 0);
        LDKNodeAnnouncement announcement_message_arg_conv;
@@ -16791,15 +19734,29 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new(J
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNodeAnnouncementInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeAnnouncementInfo ret_var = NodeAnnouncementInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeAnnouncementInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NodeAnnouncementInfo_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = NodeAnnouncementInfo_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_NodeAnnouncementInfo_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -16819,20 +19776,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1free(JNIEnv *env, jc
        NodeInfo_free(this_ptr_conv);
 }
 
-JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
-       LDKNodeInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKNodeInfo ret_var = NodeInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1channels(JNIEnv *env, jclass clz, int64_t this_ptr, int64_tArray val) {
        LDKNodeInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -16845,8 +19788,8 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1channels(JNIEnv
                val_constr.data = NULL;
        int64_t* val_vals = (*env)->GetLongArrayElements (env, val, NULL);
        for (size_t g = 0; g < val_constr.datalen; g++) {
-               int64_t arr_conv_6 = val_vals[g];
-               val_constr.data[g] = arr_conv_6;
+               int64_t val_conv_6 = val_vals[g];
+               val_constr.data[g] = val_conv_6;
        }
        (*env)->ReleaseLongArrayElements(env, val, val_vals, 0);
        NodeInfo_set_channels(&this_ptr_conv, val_constr);
@@ -16911,8 +19854,8 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeInfo_1new(JNIEnv *env,
                channels_arg_constr.data = NULL;
        int64_t* channels_arg_vals = (*env)->GetLongArrayElements (env, channels_arg, NULL);
        for (size_t g = 0; g < channels_arg_constr.datalen; g++) {
-               int64_t arr_conv_6 = channels_arg_vals[g];
-               channels_arg_constr.data[g] = arr_conv_6;
+               int64_t channels_arg_conv_6 = channels_arg_vals[g];
+               channels_arg_constr.data[g] = channels_arg_conv_6;
        }
        (*env)->ReleaseLongArrayElements(env, channels_arg, channels_arg_vals, 0);
        LDKRoutingFees lowest_inbound_channel_fees_arg_conv;
@@ -16933,15 +19876,29 @@ JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeInfo_1new(JNIEnv *env,
        return ret_ref;
 }
 
+JNIEXPORT int64_t JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone(JNIEnv *env, jclass clz, int64_t orig) {
+       LDKNodeInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeInfo ret_var = NodeInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NodeInfo_1write(JNIEnv *env, jclass clz, int64_t obj) {
        LDKNodeInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NodeInfo_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = NodeInfo_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_NodeInfo_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
@@ -16958,11 +19915,11 @@ JNIEXPORT int8_tArray JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1write(JNI
        LDKNetworkGraph obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NetworkGraph_write(&obj_conv);
-       int8_tArray arg_arr = (*env)->NewByteArray(env, arg_var.datalen);
-       (*env)->SetByteArrayRegion(env, arg_arr, 0, arg_var.datalen, arg_var.data);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = NetworkGraph_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_NetworkGraph_1read(JNIEnv *env, jclass clz, int8_tArray ser) {
index d8aa468f4e4c8549bc6f5b59a65cae1692ff67a3..623d4a4ae4f12718c2585f0791d434bd3f9d4300 100644 (file)
@@ -121,674 +121,682 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1u8Z_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u64u64Z_new
- * Signature: (JJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1new
-  (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u64u64Z_get_a
- * Signature: (J)J
+ * Method:    LDKCResult_SecretKeyErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1a
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u64u64Z_get_b
- * Signature: (J)J
+ * Method:    LDKCResult_SecretKeyErrorZ_get_ok
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u64u64Z_1get_1b
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKSpendableOutputDescriptor_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKSpendableOutputDescriptor;
+ * Method:    LDKCResult_SecretKeyErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeyErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_SpendableOutputDescriptorZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_PublicKeyErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1SpendableOutputDescriptorZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKErrorAction_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKErrorAction;
+ * Method:    LDKCResult_PublicKeyErrorZ_get_ok
+ * Signature: (J)[B
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKErrorAction_1ref_1from_1ptr
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKHTLCFailChannelUpdate_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKHTLCFailChannelUpdate;
+ * Method:    LDKCResult_PublicKeyErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCFailChannelUpdate_1ref_1from_1ptr
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeyErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKMessageSendEvent_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKMessageSendEvent;
+ * Method:    LDKCResult_TxCreationKeysDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEvent_1ref_1from_1ptr
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_MessageSendEventZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_TxCreationKeysDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MessageSendEventZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKEvent_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKEvent;
+ * Method:    LDKCResult_TxCreationKeysDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_EventZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1EventZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_usizeTransactionZ_new
- * Signature: (J[B)J
+ * Method:    LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1new
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_usizeTransactionZ_get_a
+ * Method:    LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelPublicKeysDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_usizeTransactionZ_get_b
- * Signature: (J)[B
+ * Method:    LDKCResult_TxCreationKeysErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_C2Tuple_usizeTransactionZZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_TxCreationKeysErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTransactionZZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_TxCreationKeysErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1result_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok
- * Signature: (J)V
+ * Method:    LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_get_err
- * Signature: (J)Lorg/ldk/enums/LDKChannelMonitorUpdateErr;
+ * Method:    LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_MonitorEventZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MonitorEventZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCOutputInCommitmentDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok
+ * Method:    LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok
+ * Method:    LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err
+ * Method:    LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneMonitorUpdateErrorZ_result_ok
+ * Method:    LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneMonitorUpdateErrorZ_get_ok
- * Signature: (J)V
+ * Method:    LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneMonitorUpdateErrorZ_get_err
+ * Method:    LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelTransactionParametersDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_OutPointScriptZ_new
- * Signature: (J[B)J
+ * Method:    LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1new
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_OutPointScriptZ_get_a
+ * Method:    LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_OutPointScriptZ_get_b
- * Signature: (J)[B
+ * Method:    LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HolderCommitmentTransactionDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u32TxOutZ_new
- * Signature: (IJ)J
+ * Method:    LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1new
-  (JNIEnv *, jclass, jint, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u32TxOutZ_get_a
- * Signature: (J)I
+ * Method:    LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_u32TxOutZ_get_b
+ * Method:    LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1BuiltCommitmentTransactionDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_C2Tuple_u32TxOutZZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32TxOutZZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new
- * Signature: ([B[J)J
+ * Method:    LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a
- * Signature: (J)[B
+ * Method:    LDKCResult_CommitmentTransactionDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentTransactionDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b
- * Signature: (J)[J
+ * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_new
- * Signature: ([B[[B)J
+ * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_get_err
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1new
-  (JNIEnv *, jclass, jbyteArray, jobjectArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_get_a
- * Signature: (J)[B
+ * Method:    LDKCResult_CVec_SignatureZNoneZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_get_b
+ * Method:    LDKCResult_CVec_SignatureZNoneZ_get_ok
  * Signature: (J)[[B
  */
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_CVec_SignatureZNoneZ_get_err
+ * Signature: (J)V
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok
- * Signature: (J)J
+ * Method:    LDKErrorAction_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKErrorAction;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKErrorAction_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err
- * Signature: (J)V
+ * Method:    LDKHTLCFailChannelUpdate_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKHTLCFailChannelUpdate;
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1err
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKHTLCFailChannelUpdate_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SignatureNoneZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKMessageSendEvent_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKMessageSendEvent;
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1result_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEvent_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SignatureNoneZ_get_ok
- * Signature: (J)[B
+ * Method:    LDKCVec_MessageSendEventZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MessageSendEventZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SignatureNoneZ_get_err
- * Signature: (J)V
+ * Method:    LDKCResult_boolLightningErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1err
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKChannelKeys_new
- * Signature: (Lorg/ldk/impl/bindings/LDKChannelKeys;J)J
+ * Method:    LDKCResult_boolLightningErrorZ_get_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelKeys_1new
-  (JNIEnv *, jclass, jobject, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_get_per_commitment_point
- * Signature: (JJ)[B
+ * Method:    LDKCResult_boolLightningErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1get_1per_1commitment_1point
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_release_commitment_secret
- * Signature: (JJ)[B
+ * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new
+ * Signature: (JJJ)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1release_1commitment_1secret
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new
+  (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_key_derivation_params
+ * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1key_1derivation_1params
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_counterparty_commitment
- * Signature: (JJ)J
+ * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1counterparty_1commitment
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_holder_commitment_and_htlcs
- * Signature: (JJ)J
+ * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1holder_1commitment_1and_1htlcs
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_justice_transaction
- * Signature: (J[BJJ[BJ)J
+ * Method:    LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1justice_1transaction
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_counterparty_htlc_transaction
- * Signature: (J[BJJ[BJ)J
+ * Method:    LDKCVec_NodeAnnouncementZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1counterparty_1htlc_1transaction
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NodeAnnouncementZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_closing_transaction
- * Signature: (J[B)J
+ * Method:    LDKCResult_NoneLightningErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1closing_1transaction
-  (JNIEnv *, jclass, jlong, jbyteArray);
-
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_sign_channel_announcement
- * Signature: (JJ)J
+ * Method:    LDKCResult_NoneLightningErrorZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1sign_1channel_1announcement
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_ready_channel
- * Signature: (JJ)V
+ * Method:    LDKCResult_NoneLightningErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1ready_1channel
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_write
+ * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1write
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_get_pubkeys
+ * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1get_1pubkeys
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_new
- * Signature: ([BJ)J
+ * Method:    LDKCResult_NonePeerHandleErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_get_a
- * Signature: (J)[B
+ * Method:    LDKCResult_NonePeerHandleErrorZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_get_b
+ * Method:    LDKCResult_NonePeerHandleErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok
+ * Method:    LDKCResult_boolPeerHandleErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_boolPeerHandleErrorZ_get_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err
+ * Method:    LDKCResult_boolPeerHandleErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok
+ * Method:    LDKCResult_InitFeaturesDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok
+ * Method:    LDKCResult_InitFeaturesDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err
+ * Method:    LDKCResult_InitFeaturesDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitFeaturesDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChanKeySignerDecodeErrorZ_result_ok
+ * Method:    LDKCResult_NodeFeaturesDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChanKeySignerDecodeErrorZ_get_ok
+ * Method:    LDKCResult_NodeFeaturesDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChanKeySignerDecodeErrorZ_get_err
+ * Method:    LDKCResult_NodeFeaturesDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChanKeySignerDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeFeaturesDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok
+ * Method:    LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok
+ * Method:    LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err
+ * Method:    LDKCResult_ChannelFeaturesDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemoryChannelKeysDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelFeaturesDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxOutAccessErrorZ_result_ok
+ * Method:    LDKCResult_ChannelConfigDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxOutAccessErrorZ_get_ok
+ * Method:    LDKCResult_ChannelConfigDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxOutAccessErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/LDKAccessError;
+ * Method:    LDKCResult_ChannelConfigDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelConfigDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKAPIError_ref_from_ptr
- * Signature: (J)Lorg/ldk/impl/bindings/LDKAPIError;
+ * Method:    LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneAPIErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1result_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneAPIErrorZ_get_ok
- * Signature: (J)V
+ * Method:    LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1DirectionalChannelInfoDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneAPIErrorZ_get_err
+ * Method:    LDKCResult_ChannelInfoDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelInfoDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_ChannelDetailsZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_ChannelInfoDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelDetailsZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelInfoDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePaymentSendFailureZ_result_ok
+ * Method:    LDKCResult_RoutingFeesDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePaymentSendFailureZ_get_ok
- * Signature: (J)V
+ * Method:    LDKCResult_RoutingFeesDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePaymentSendFailureZ_get_err
+ * Method:    LDKCResult_RoutingFeesDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -809,1570 +817,3450 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NetAddressZ_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_ChannelMonitorZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelMonitorZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKWatch_new
- * Signature: (Lorg/ldk/impl/bindings/LDKWatch;)J
+ * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Watch_watch_channel
- * Signature: (JJJ)J
+ * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel
-  (JNIEnv *, jclass, jlong, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Watch_update_channel
- * Signature: (JJJ)J
+ * Method:    LDKCVec_u64Z_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel
-  (JNIEnv *, jclass, jlong, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1u64Z_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Watch_release_pending_monitor_events
- * Signature: (J)[J
+ * Method:    LDKCResult_NodeInfoDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pending_1monitor_1events
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKBroadcasterInterface_new
- * Signature: (Lorg/ldk/impl/bindings/LDKBroadcasterInterface;)J
+ * Method:    LDKCResult_NodeInfoDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    BroadcasterInterface_broadcast_transaction
- * Signature: (J[B)V
+ * Method:    LDKCResult_NodeInfoDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1broadcast_1transaction
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKKeysInterface_new
- * Signature: (Lorg/ldk/impl/bindings/LDKKeysInterface;)J
+ * Method:    LDKCResult_NetworkGraphDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_get_node_secret
- * Signature: (J)[B
+ * Method:    LDKCResult_NetworkGraphDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1secret
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_get_destination_script
- * Signature: (J)[B
+ * Method:    LDKCResult_NetworkGraphDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1destination_1script
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_get_shutdown_pubkey
- * Signature: (J)[B
+ * Method:    LDKC2Tuple_usizeTransactionZ_new
+ * Signature: (J[B)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1shutdown_1pubkey
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1new
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_get_channel_keys
- * Signature: (JZJ)J
+ * Method:    LDKC2Tuple_usizeTransactionZ_get_a
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1channel_1keys
-  (JNIEnv *, jclass, jlong, jboolean, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1a
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_get_secure_random_bytes
+ * Method:    LDKC2Tuple_usizeTransactionZ_get_b
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1secure_1random_1bytes
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1usizeTransactionZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    KeysInterface_read_chan_signer
- * Signature: (J[B)J
+ * Method:    LDKCVec_C2Tuple_usizeTransactionZZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysInterface_1read_1chan_1signer
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1usizeTransactionZZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKFeeEstimator_new
- * Signature: (Lorg/ldk/impl/bindings/LDKFeeEstimator;)J
+ * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FeeEstimator_get_est_sat_per_1000_weight
- * Signature: (JLorg/ldk/enums/LDKConfirmationTarget;)I
+ * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1get_1est_1sat_1per_11000_1weight
-  (JNIEnv *, jclass, jlong, jobject);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKLogger_new
- * Signature: (Lorg/ldk/impl/bindings/LDKLogger;)J
+ * Method:    LDKCResult_NoneChannelMonitorUpdateErrZ_get_err
+ * Signature: (J)Lorg/ldk/enums/LDKChannelMonitorUpdateErr;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneChannelMonitorUpdateErrZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelManagerZ_new
- * Signature: ([BJ)J
+ * Method:    LDKMonitorEvent_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKMonitorEvent;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKMonitorEvent_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelManagerZ_get_a
- * Signature: (J)[B
+ * Method:    LDKCVec_MonitorEventZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1MonitorEventZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC2Tuple_BlockHashChannelManagerZ_get_b
- * Signature: (J)J
+ * Method:    LDKSpendableOutputDescriptor_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKSpendableOutputDescriptor;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKSpendableOutputDescriptor_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCVec_SpendableOutputDescriptorZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1SpendableOutputDescriptorZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKEvent_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKEvent;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1ok
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKEvent_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCVec_EventZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1EventZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetAddressu8Z_result_ok
+ * Method:    LDKCResult_OutPointDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetAddressu8Z_get_ok
+ * Method:    LDKCResult_OutPointDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetAddressu8Z_get_err
- * Signature: (J)B
+ * Method:    LDKCResult_OutPointDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OutPointDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok
+ * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok
+ * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err
+ * Method:    LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelMonitorUpdateDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_u64Z_new
- * Signature: ([J)J
+ * Method:    LDKCResult_HTLCUpdateDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1u64Z_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_UpdateAddHTLCZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_HTLCUpdateDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateAddHTLCZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_UpdateFulfillHTLCZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_HTLCUpdateDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFulfillHTLCZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1HTLCUpdateDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_UpdateFailHTLCZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_NoneMonitorUpdateErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailHTLCZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_UpdateFailMalformedHTLCZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_NoneMonitorUpdateErrorZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailMalformedHTLCZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolLightningErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_NoneMonitorUpdateErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1result_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneMonitorUpdateErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolLightningErrorZ_get_ok
- * Signature: (J)Z
+ * Method:    LDKC2Tuple_OutPointScriptZ_new
+ * Signature: (J[B)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1new
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolLightningErrorZ_get_err
+ * Method:    LDKC2Tuple_OutPointScriptZ_get_a
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolLightningErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new
- * Signature: (JJJ)J
+ * Method:    LDKC2Tuple_OutPointScriptZ_get_b
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new
-  (JNIEnv *, jclass, jlong, jlong, jlong);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1OutPointScriptZ_1get_1b
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a
- * Signature: (J)J
+ * Method:    LDKC2Tuple_u32TxOutZ_new
+ * Signature: (IJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1a
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1new
+  (JNIEnv *, jclass, jint, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b
- * Signature: (J)J
+ * Method:    LDKC2Tuple_u32TxOutZ_get_a
+ * Signature: (J)I
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1b
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c
+ * Method:    LDKC2Tuple_u32TxOutZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1get_1c
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1u32TxOutZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new
+ * Method:    LDKCVec_C2Tuple_u32TxOutZZ_new
  * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1new
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1u32TxOutZZ_1new
   (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_NodeAnnouncementZ_new
- * Signature: ([J)J
+ * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new
+ * Signature: ([B[J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1NodeAnnouncementZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneLightningErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a
+ * Signature: (J)[B
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1result_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneLightningErrorZ_get_ok
- * Signature: (J)V
+ * Method:    LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b
+ * Signature: (J)[J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1ok
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NoneLightningErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneLightningErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_new
+ * Signature: ([B[[B)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1new
+  (JNIEnv *, jclass, jbyteArray, jobjectArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_get_a
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKC2Tuple_SignatureCVec_SignatureZZ_get_b
+ * Signature: (J)[[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1err
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1SignatureCVec_1SignatureZZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InitDecodeErrorZ_result_ok
+ * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InitDecodeErrorZ_get_ok
+ * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_InitDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1SignatureCVec_1SignatureZZNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PingDecodeErrorZ_result_ok
+ * Method:    LDKCResult_SignatureNoneZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PingDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_SignatureNoneZ_get_ok
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PingDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_SignatureNoneZ_get_err
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignatureNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PongDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKSign_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKSign;J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSign_1new
+  (JNIEnv *, jclass, jobject, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PongDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    Sign_get_per_commitment_point
+ * Signature: (JJ)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Sign_1get_1per_1commitment_1point
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PongDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    Sign_release_commitment_secret
+ * Signature: (JJ)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Sign_1release_1commitment_1secret
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    Sign_channel_keys_id
+ * Signature: (J)[B
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1result_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Sign_1channel_1keys_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    Sign_sign_counterparty_commitment
+ * Signature: (JJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1counterparty_1commitment
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    Sign_sign_holder_commitment_and_htlcs
+ * Signature: (JJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1holder_1commitment_1and_1htlcs
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    Sign_sign_justice_transaction
+ * Signature: (J[BJJ[BJ)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1justice_1transaction
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    Sign_sign_counterparty_htlc_transaction
+ * Signature: (J[BJJ[BJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1counterparty_1htlc_1transaction
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    Sign_sign_closing_transaction
+ * Signature: (J[B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1closing_1transaction
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ErrorMessageDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    Sign_sign_channel_announcement
+ * Signature: (JJ)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Sign_1sign_1channel_1announcement
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ErrorMessageDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    Sign_ready_channel
+ * Signature: (JJ)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Sign_1ready_1channel
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Sign_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_Sign_1write
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ErrorMessageDecodeErrorZ_get_err
+ * Method:    Sign_get_pubkeys
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Sign_1get_1pubkeys
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_new
+ * Signature: ([BJ)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_get_a
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err
+ * Method:    LDKC2Tuple_BlockHashChannelMonitorZ_get_b
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelMonitorZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok
+ * Method:    LDKCResult_TxOutAccessErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok
+ * Method:    LDKCResult_TxOutAccessErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_TxOutAccessErrorZ_get_err
+ * Signature: (J)Lorg/ldk/enums/LDKAccessError;
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1err
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxOutAccessErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok
+ * Method:    LDKAPIError_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKAPIError;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKAPIError_1ref_1from_1ptr
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_NoneAPIErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_NoneAPIErrorZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_get_err
+ * Method:    LDKCResult_NoneAPIErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NoneAPIErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCVec_CResult_NoneAPIErrorZZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1CResult_1NoneAPIErrorZZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCVec_APIErrorZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1APIErrorZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCVec_ChannelDetailsZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelDetailsZ_1new
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKPaymentSendFailure_ref_from_ptr
+ * Signature: (J)Lorg/ldk/impl/bindings/LDKPaymentSendFailure;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKPaymentSendFailure_1ref_1from_1ptr
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok
+ * Method:    LDKCResult_NonePaymentSendFailureZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_NonePaymentSendFailureZ_get_ok
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err
+ * Method:    LDKCResult_NonePaymentSendFailureZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePaymentSendFailureZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCVec_ChannelMonitorZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1ChannelMonitorZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok
- * Signature: (J)[B
+ * Method:    LDKWatch_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKWatch;)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKWatch_1new
+  (JNIEnv *, jclass, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err
- * Signature: (J)J
+ * Method:    Watch_watch_channel
+ * Signature: (JJJ)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1u8ZPeerHandleErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Watch_1watch_1channel
+  (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePeerHandleErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    Watch_update_channel
+ * Signature: (JJJ)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Watch_1update_1channel
+  (JNIEnv *, jclass, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePeerHandleErrorZ_get_ok
- * Signature: (J)V
+ * Method:    Watch_release_pending_monitor_events
+ * Signature: (J)[J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1ok
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_Watch_1release_1pending_1monitor_1events
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NonePeerHandleErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKBroadcasterInterface_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKBroadcasterInterface;)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NonePeerHandleErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKBroadcasterInterface_1new
+  (JNIEnv *, jclass, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolPeerHandleErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    BroadcasterInterface_broadcast_transaction
+ * Signature: (J[B)V
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BroadcasterInterface_1broadcast_1transaction
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolPeerHandleErrorZ_get_ok
+ * Method:    LDKCResult_SignDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_boolPeerHandleErrorZ_get_err
+ * Method:    LDKCResult_SignDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1boolPeerHandleErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SecretKeySecpErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_SignDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1result_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SignDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SecretKeySecpErrorZ_get_ok
- * Signature: (J)[B
+ * Method:    LDKKeysInterface_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKKeysInterface;)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKKeysInterface_1new
+  (JNIEnv *, jclass, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_SecretKeySecpErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
+ * Method:    KeysInterface_get_node_secret
+ * Signature: (J)[B
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SecretKeySecpErrorZ_1get_1err
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1node_1secret
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PublicKeySecpErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    KeysInterface_get_destination_script
+ * Signature: (J)[B
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1result_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1destination_1script
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PublicKeySecpErrorZ_get_ok
+ * Method:    KeysInterface_get_shutdown_pubkey
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1shutdown_1pubkey
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_PublicKeySecpErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
+ * Method:    KeysInterface_get_channel_signer
+ * Signature: (JZJ)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PublicKeySecpErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1channel_1signer
+  (JNIEnv *, jclass, jlong, jboolean, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxCreationKeysSecpErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    KeysInterface_get_secure_random_bytes
+ * Signature: (J)[B
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1result_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_KeysInterface_1get_1secure_1random_1bytes
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxCreationKeysSecpErrorZ_get_ok
- * Signature: (J)J
+ * Method:    KeysInterface_read_chan_signer
+ * Signature: (J[B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysInterface_1read_1chan_1signer
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TxCreationKeysSecpErrorZ_get_err
- * Signature: (J)Lorg/ldk/enums/LDKSecp256k1Error;
+ * Method:    LDKFeeEstimator_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKFeeEstimator;)J
  */
-JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TxCreationKeysSecpErrorZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFeeEstimator_1new
+  (JNIEnv *, jclass, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok
- * Signature: (J)Z
+ * Method:    FeeEstimator_get_est_sat_per_1000_weight
+ * Signature: (JLorg/ldk/enums/LDKConfirmationTarget;)I
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1result_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jint JNICALL Java_org_ldk_impl_bindings_FeeEstimator_1get_1est_1sat_1per_11000_1weight
+  (JNIEnv *, jclass, jlong, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok
- * Signature: (J)J
+ * Method:    LDKLogger_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKLogger;)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKLogger_1new
+  (JNIEnv *, jclass, jobject);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_TrustedCommitmentTransactionNoneZ_get_err
- * Signature: (J)V
+ * Method:    LDKC2Tuple_BlockHashChannelManagerZ_new
+ * Signature: ([BJ)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TrustedCommitmentTransactionNoneZ_1get_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_SignatureZNoneZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKC2Tuple_BlockHashChannelManagerZ_get_a
+ * Signature: (J)[B
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1result_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1a
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_SignatureZNoneZ_get_ok
- * Signature: (J)[[B
+ * Method:    LDKC2Tuple_BlockHashChannelManagerZ_get_b
+ * Signature: (J)J
  */
-JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKC2Tuple_1BlockHashChannelManagerZ_1get_1b
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_CVec_SignatureZNoneZ_get_err
- * Signature: (J)V
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1SignatureZNoneZ_1get_1err
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_RouteHopZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHopZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RouteDecodeErrorZ_result_ok
- * Signature: (J)Z
+ * Method:    LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1result_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RouteDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RouteDecodeErrorZ_get_err
+ * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCVec_RouteHintZ_new
- * Signature: ([J)J
+ * Method:    LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHintZ_1new
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1SpendableOutputDescriptorDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RouteLightningErrorZ_result_ok
+ * Method:    LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1CVec_1u8ZZNoneZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RouteLightningErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok
+ * Signature: (J)[[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1ok
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1CVec_1u8ZZNoneZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RouteLightningErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_CVec_CVec_u8ZZNoneZ_get_err
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CVec_1CVec_1u8ZZNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RoutingFeesDecodeErrorZ_result_ok
+ * Method:    LDKCResult_InMemorySignerDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemorySignerDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RoutingFeesDecodeErrorZ_get_ok
+ * Method:    LDKCResult_InMemorySignerDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemorySignerDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_RoutingFeesDecodeErrorZ_get_err
+ * Method:    LDKCResult_InMemorySignerDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RoutingFeesDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InMemorySignerDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok
+ * Method:    LDKCVec_TxOutZ_new
+ * Signature: ([J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1TxOutZ_1new
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_TransactionNoneZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TransactionNoneZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok
- * Signature: (J)J
+ * Method:    LDKCResult_TransactionNoneZ_get_ok
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1ok
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TransactionNoneZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err
- * Signature: (J)J
+ * Method:    LDKCResult_TransactionNoneZ_get_err
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementInfoDecodeErrorZ_1get_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LDKCResult_1TransactionNoneZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeInfoDecodeErrorZ_result_ok
+ * Method:    LDKCVec_RouteHopZ_new
+ * Signature: ([J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHopZ_1new
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_RouteDecodeErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeInfoDecodeErrorZ_get_ok
+ * Method:    LDKCResult_RouteDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NodeInfoDecodeErrorZ_get_err
+ * Method:    LDKCResult_RouteDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeInfoDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetworkGraphDecodeErrorZ_result_ok
+ * Method:    LDKCVec_RouteHintZ_new
+ * Signature: ([J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1RouteHintZ_1new
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_RouteLightningErrorZ_result_ok
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1result_1ok
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetworkGraphDecodeErrorZ_get_ok
+ * Method:    LDKCResult_RouteLightningErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKCResult_NetworkGraphDecodeErrorZ_get_err
+ * Method:    LDKCResult_RouteLightningErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetworkGraphDecodeErrorZ_1get_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RouteLightningErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKMessageSendEventsProvider_new
- * Signature: (Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ * Method:    LDKCResult_NetAddressu8Z_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    MessageSendEventsProvider_get_and_clear_pending_msg_events
- * Signature: (J)[J
+ * Method:    LDKCResult_NetAddressu8Z_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1get_1and_1clear_1pending_1msg_1events
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKEventsProvider_new
- * Signature: (Lorg/ldk/impl/bindings/LDKEventsProvider;)J
+ * Method:    LDKCResult_NetAddressu8Z_get_err
+ * Signature: (J)B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jbyte JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NetAddressu8Z_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    EventsProvider_get_and_clear_pending_events
- * Signature: (J)[J
+ * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_EventsProvider_1get_1and_1clear_1pending_1events
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKAccess_new
- * Signature: (Lorg/ldk/impl/bindings/LDKAccess;)J
+ * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKAccess_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Access_get_utxo
- * Signature: (J[BJ)J
+ * Method:    LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Access_1get_1utxo
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CResult_1NetAddressu8ZDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKFilter_new
- * Signature: (Lorg/ldk/impl/bindings/LDKFilter;)J
+ * Method:    LDKCVec_UpdateAddHTLCZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFilter_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateAddHTLCZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Filter_register_tx
- * Signature: (J[B[B)V
+ * Method:    LDKCVec_UpdateFulfillHTLCZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1tx
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFulfillHTLCZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Filter_register_output
- * Signature: (JJ[B)V
+ * Method:    LDKCVec_UpdateFailHTLCZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output
-  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailHTLCZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKPersist_new
- * Signature: (Lorg/ldk/impl/bindings/LDKPersist;)J
+ * Method:    LDKCVec_UpdateFailMalformedHTLCZ_new
+ * Signature: ([J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCVec_1UpdateFailMalformedHTLCZ_1new
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Persist_persist_new_channel
- * Signature: (JJJ)J
+ * Method:    LDKCResult_AcceptChannelDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel
-  (JNIEnv *, jclass, jlong, jlong, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Persist_update_persisted_channel
- * Signature: (JJJJ)J
+ * Method:    LDKCResult_AcceptChannelDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel
-  (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKChannelMessageHandler_new
- * Signature: (Lorg/ldk/impl/bindings/LDKChannelMessageHandler;Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ * Method:    LDKCResult_AcceptChannelDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new
-  (JNIEnv *, jclass, jobject, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AcceptChannelDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_open_channel
- * Signature: (J[BJJ)V
+ * Method:    LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1open_1channel
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_accept_channel
- * Signature: (J[BJJ)V
+ * Method:    LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1accept_1channel
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_funding_created
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1created
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1AnnouncementSignaturesDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_funding_signed
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1signed
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_funding_locked
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1locked
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_shutdown
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_ChannelReestablishDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1shutdown
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelReestablishDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_closing_signed
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_ClosingSignedDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1closing_1signed
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_update_add_htlc
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_ClosingSignedDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1add_1htlc
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_update_fulfill_htlc
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_ClosingSignedDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fulfill_1htlc
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ClosingSignedDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_update_fail_htlc
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_CommitmentSignedDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1htlc
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_update_fail_malformed_htlc
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_CommitmentSignedDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1malformed_1htlc
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_commitment_signed
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_CommitmentSignedDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1commitment_1signed
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1CommitmentSignedDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_revoke_and_ack
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_FundingCreatedDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1revoke_1and_1ack
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_update_fee
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_FundingCreatedDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fee
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_announcement_signatures
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_FundingCreatedDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1announcement_1signatures
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingCreatedDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_peer_disconnected
- * Signature: (J[BZ)V
+ * Method:    LDKCResult_FundingSignedDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1disconnected
-  (JNIEnv *, jclass, jlong, jbyteArray, jboolean);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_peer_connected
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_FundingSignedDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1connected
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_channel_reestablish
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_FundingSignedDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1channel_1reestablish
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingSignedDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMessageHandler_handle_error
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_FundingLockedDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1error
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKRoutingMessageHandler_new
- * Signature: (Lorg/ldk/impl/bindings/LDKRoutingMessageHandler;Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ * Method:    LDKCResult_FundingLockedDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new
-  (JNIEnv *, jclass, jobject, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_node_announcement
- * Signature: (JJ)J
+ * Method:    LDKCResult_FundingLockedDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1node_1announcement
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1FundingLockedDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_channel_announcement
- * Signature: (JJ)J
+ * Method:    LDKCResult_InitDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1announcement
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_channel_update
- * Signature: (JJ)J
+ * Method:    LDKCResult_InitDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1update
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_htlc_fail_channel_update
- * Signature: (JJ)V
+ * Method:    LDKCResult_InitDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1htlc_1fail_1channel_1update
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1InitDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_get_next_channel_announcements
- * Signature: (JJB)[J
+ * Method:    LDKCResult_OpenChannelDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1channel_1announcements
-  (JNIEnv *, jclass, jlong, jlong, jbyte);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_get_next_node_announcements
- * Signature: (J[BB)[J
+ * Method:    LDKCResult_OpenChannelDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1node_1announcements
-  (JNIEnv *, jclass, jlong, jbyteArray, jbyte);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_sync_routing_table
- * Signature: (J[BJ)V
+ * Method:    LDKCResult_OpenChannelDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1sync_1routing_1table
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1OpenChannelDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_reply_channel_range
- * Signature: (J[BJ)J
+ * Method:    LDKCResult_RevokeAndACKDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1channel_1range
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_reply_short_channel_ids_end
- * Signature: (J[BJ)J
+ * Method:    LDKCResult_RevokeAndACKDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1short_1channel_1ids_1end
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_query_channel_range
- * Signature: (J[BJ)J
+ * Method:    LDKCResult_RevokeAndACKDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1channel_1range
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1RevokeAndACKDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RoutingMessageHandler_handle_query_short_channel_ids
- * Signature: (J[BJ)J
+ * Method:    LDKCResult_ShutdownDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1short_1channel_1ids
-  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    LDKSocketDescriptor_new
- * Signature: (Lorg/ldk/impl/bindings/LDKSocketDescriptor;)J
+ * Method:    LDKCResult_ShutdownDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    SocketDescriptor_send_data
- * Signature: (J[BZ)J
+ * Method:    LDKCResult_ShutdownDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1send_1data
-  (JNIEnv *, jclass, jlong, jbyteArray, jboolean);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ShutdownDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    SocketDescriptor_disconnect_socket
- * Signature: (J)V
+ * Method:    LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1disconnect_1socket
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    SocketDescriptor_hash
+ * Method:    LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Transaction_free
- * Signature: ([B)V
+ * Method:    LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Transaction_1free
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailHTLCDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    TxOut_free
- * Signature: (J)V
+ * Method:    LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    TxOut_clone
+ * Method:    LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxOut_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_SpendableOutputDescriptorZ_free
- * Signature: ([J)V
+ * Method:    LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFailMalformedHTLCDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_MessageSendEventZ_free
- * Signature: ([J)V
+ * Method:    LDKCResult_UpdateFeeDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_EventZ_free
- * Signature: ([J)V
+ * Method:    LDKCResult_UpdateFeeDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_usizeTransactionZ_free
- * Signature: (J)V
+ * Method:    LDKCResult_UpdateFeeDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFeeDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_usizeTransactionZ_new
- * Signature: (J[B)J
+ * Method:    LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_C2Tuple_usizeTransactionZZ_free
- * Signature: ([J)V
+ * Method:    LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_ok
- * Signature: ()J
+ * Method:    LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateFulfillHTLCDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_err
- * Signature: (Lorg/ldk/enums/LDKChannelMonitorUpdateErr;)J
+ * Method:    LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_free
- * Signature: (J)V
+ * Method:    LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneChannelMonitorUpdateErrZ_clone
+ * Method:    LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UpdateAddHTLCDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_MonitorEventZ_free
- * Signature: ([J)V
+ * Method:    LDKCResult_PingDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_ok
+ * Method:    LDKCResult_PingDecodeErrorZ_get_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_err
+ * Method:    LDKCResult_PingDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PingDecodeErrorZ_1get_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    LDKCResult_PongDecodeErrorZ_result_ok
+ * Signature: (J)Z
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1free
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1result_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneMonitorUpdateErrorZ_ok
- * Signature: ()J
+ * Method:    LDKCResult_PongDecodeErrorZ_get_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneMonitorUpdateErrorZ_err
+ * Method:    LDKCResult_PongDecodeErrorZ_get_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1PongDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelAnnouncementDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelAnnouncementDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedChannelUpdateDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelUpdateDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelUpdateDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ChannelUpdateDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ChannelUpdateDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ErrorMessageDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ErrorMessageDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ErrorMessageDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ErrorMessageDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1UnsignedNodeAnnouncementDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_NodeAnnouncementDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1NodeAnnouncementDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryShortChannelIdsDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyShortChannelIdsEndDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_QueryChannelRangeDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1QueryChannelRangeDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1ReplyChannelRangeDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok
+ * Signature: (J)Z
+ */
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1result_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKCResult_1GossipTimestampFilterDecodeErrorZ_1get_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKMessageSendEventsProvider_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKMessageSendEventsProvider_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    MessageSendEventsProvider_get_and_clear_pending_msg_events
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_MessageSendEventsProvider_1get_1and_1clear_1pending_1msg_1events
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKEventsProvider_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKEventsProvider;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKEventsProvider_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    EventsProvider_get_and_clear_pending_events
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_EventsProvider_1get_1and_1clear_1pending_1events
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKAccess_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKAccess;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKAccess_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Access_get_utxo
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Access_1get_1utxo
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKListen_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKListen;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKListen_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Listen_block_connected
+ * Signature: (J[BI)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1block_1connected
+  (JNIEnv *, jclass, jlong, jbyteArray, jint);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Listen_block_disconnected
+ * Signature: (J[BI)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1block_1disconnected
+  (JNIEnv *, jclass, jlong, jbyteArray, jint);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKFilter_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKFilter;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKFilter_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Filter_register_tx
+ * Signature: (J[B[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1tx
+  (JNIEnv *, jclass, jlong, jbyteArray, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Filter_register_output
+ * Signature: (JJ[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Filter_1register_1output
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKPersist_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKPersist;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKPersist_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Persist_persist_new_channel
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Persist_1persist_1new_1channel
+  (JNIEnv *, jclass, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Persist_update_persisted_channel
+ * Signature: (JJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Persist_1update_1persisted_1channel
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKChannelMessageHandler_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKChannelMessageHandler;Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKChannelMessageHandler_1new
+  (JNIEnv *, jclass, jobject, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_open_channel
+ * Signature: (J[BJJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1open_1channel
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_accept_channel
+ * Signature: (J[BJJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1accept_1channel
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_funding_created
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1created
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_funding_signed
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1signed
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_funding_locked
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1funding_1locked
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_shutdown
+ * Signature: (J[BJJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1shutdown
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_closing_signed
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1closing_1signed
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_update_add_htlc
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1add_1htlc
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_update_fulfill_htlc
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fulfill_1htlc
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_update_fail_htlc
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1htlc
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_update_fail_malformed_htlc
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fail_1malformed_1htlc
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_commitment_signed
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1commitment_1signed
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_revoke_and_ack
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1revoke_1and_1ack
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_update_fee
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1update_1fee
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_announcement_signatures
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1announcement_1signatures
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_peer_disconnected
+ * Signature: (J[BZ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1disconnected
+  (JNIEnv *, jclass, jlong, jbyteArray, jboolean);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_peer_connected
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1peer_1connected
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_channel_reestablish
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1channel_1reestablish
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMessageHandler_handle_error
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMessageHandler_1handle_1error
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKRoutingMessageHandler_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKRoutingMessageHandler;Lorg/ldk/impl/bindings/LDKMessageSendEventsProvider;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKRoutingMessageHandler_1new
+  (JNIEnv *, jclass, jobject, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_node_announcement
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1node_1announcement
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_channel_announcement
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1announcement
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_channel_update
+ * Signature: (JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1channel_1update
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_htlc_fail_channel_update
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1htlc_1fail_1channel_1update
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_get_next_channel_announcements
+ * Signature: (JJB)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1channel_1announcements
+  (JNIEnv *, jclass, jlong, jlong, jbyte);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_get_next_node_announcements
+ * Signature: (J[BB)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1get_1next_1node_1announcements
+  (JNIEnv *, jclass, jlong, jbyteArray, jbyte);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_sync_routing_table
+ * Signature: (J[BJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1sync_1routing_1table
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_reply_channel_range
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1channel_1range
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_reply_short_channel_ids_end
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1reply_1short_1channel_1ids_1end
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_query_channel_range
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1channel_1range
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingMessageHandler_handle_query_short_channel_ids
+ * Signature: (J[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingMessageHandler_1handle_1query_1short_1channel_1ids
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    LDKSocketDescriptor_new
+ * Signature: (Lorg/ldk/impl/bindings/LDKSocketDescriptor;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LDKSocketDescriptor_1new
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SocketDescriptor_send_data
+ * Signature: (J[BZ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1send_1data
+  (JNIEnv *, jclass, jlong, jbyteArray, jboolean);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SocketDescriptor_disconnect_socket
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1disconnect_1socket
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    SocketDescriptor_hash
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Transaction_free
+ * Signature: ([B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Transaction_1free
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TxOut_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxOut_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TxOut_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxOut_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SecretKeyErrorZ_ok
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1ok
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SecretKeyErrorZ_err
+ * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_SecretKeyErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeyErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyErrorZ_ok
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1ok
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyErrorZ_err
+ * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_PublicKeyErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeyErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelPublicKeysDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelPublicKeysDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelPublicKeysDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelPublicKeysDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelPublicKeysDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysErrorZ_err
+ * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxCreationKeysErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCOutputInCommitmentDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCOutputInCommitmentDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCOutputInCommitmentDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCOutputInCommitmentDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCOutputInCommitmentDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CounterpartyChannelTransactionParametersDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelTransactionParametersDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelTransactionParametersDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelTransactionParametersDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelTransactionParametersDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelTransactionParametersDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_SignatureZ_free
+ * Signature: ([[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free
+  (JNIEnv *, jclass, jobjectArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HolderCommitmentTransactionDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HolderCommitmentTransactionDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HolderCommitmentTransactionDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HolderCommitmentTransactionDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HolderCommitmentTransactionDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BuiltCommitmentTransactionDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BuiltCommitmentTransactionDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BuiltCommitmentTransactionDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_BuiltCommitmentTransactionDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1BuiltCommitmentTransactionDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CommitmentTransactionDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CommitmentTransactionDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CommitmentTransactionDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CommitmentTransactionDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentTransactionDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrustedCommitmentTransactionNoneZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrustedCommitmentTransactionNoneZ_err
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1err
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TrustedCommitmentTransactionNoneZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_SignatureZNoneZ_ok
+ * Signature: ([[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok
+  (JNIEnv *, jclass, jobjectArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_SignatureZNoneZ_err
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_SignatureZNoneZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_SignatureZNoneZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_MessageSendEventZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MessageSendEventZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolLightningErrorZ_ok
+ * Signature: (Z)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok
+  (JNIEnv *, jclass, jboolean);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolLightningErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolLightningErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolLightningErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new
+ * Signature: (JJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new
+  (JNIEnv *, jclass, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_NodeAnnouncementZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneLightningErrorZ_ok
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1ok
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneLightningErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneLightningErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneLightningErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_PublicKeyZ_free
+ * Signature: ([[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free
+  (JNIEnv *, jclass, jobjectArray);
+
+/*
+ * 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_CVec_u8ZPeerHandleErrorZ_ok
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_u8ZPeerHandleErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_u8ZPeerHandleErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_u8ZPeerHandleErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePeerHandleErrorZ_ok
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePeerHandleErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePeerHandleErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePeerHandleErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolPeerHandleErrorZ_ok
+ * Signature: (Z)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok
+  (JNIEnv *, jclass, jboolean);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolPeerHandleErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolPeerHandleErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_boolPeerHandleErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InitFeaturesDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InitFeaturesDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InitFeaturesDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InitFeaturesDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeFeaturesDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeFeaturesDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeFeaturesDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeFeaturesDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelFeaturesDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelFeaturesDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelFeaturesDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelFeaturesDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelConfigDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelConfigDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelConfigDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelConfigDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelConfigDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DirectionalChannelInfoDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DirectionalChannelInfoDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DirectionalChannelInfoDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_DirectionalChannelInfoDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1DirectionalChannelInfoDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelInfoDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelInfoDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelInfoDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelInfoDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelInfoDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RoutingFeesDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RoutingFeesDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RoutingFeesDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RoutingFeesDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_NetAddressZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_u64Z_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeInfoDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeInfoDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeInfoDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NodeInfoDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NetworkGraphDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NetworkGraphDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NetworkGraphDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NetworkGraphDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_usizeTransactionZ_new
+ * Signature: (J[B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1new
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_usizeTransactionZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1usizeTransactionZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_C2Tuple_usizeTransactionZZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1usizeTransactionZZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneChannelMonitorUpdateErrZ_ok
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1ok
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneChannelMonitorUpdateErrZ_err
+ * Signature: (Lorg/ldk/enums/LDKChannelMonitorUpdateErr;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneChannelMonitorUpdateErrZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneChannelMonitorUpdateErrZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneChannelMonitorUpdateErrZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_MonitorEventZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1MonitorEventZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_EventZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1EventZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutPointDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutPointDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutPointDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_OutPointDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OutPointDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_ChannelMonitorUpdateDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelMonitorUpdateDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCUpdateDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCUpdateDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCUpdateDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_HTLCUpdateDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1HTLCUpdateDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneMonitorUpdateErrorZ_ok
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1ok
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneMonitorUpdateErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2393,10 +4281,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneMonitorUpdateErr
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_OutPointScriptZ_free
- * Signature: (J)V
+ * Method:    C2Tuple_OutPointScriptZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -2407,6 +4295,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1new
   (JNIEnv *, jclass, jlong, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_OutPointScriptZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1OutPointScriptZ_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CVec_TransactionZ_free
@@ -2423,14 +4319,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TransactionZ_1free
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1clone
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_u32TxOutZ_free
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_u32TxOutZ_new
@@ -2441,19 +4329,19 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_C2Tuple_u32TxOutZZ_free
- * Signature: ([J)V
+ * Method:    C2Tuple_u32TxOutZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u32TxOutZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free
- * Signature: (J)V
+ * Method:    CVec_C2Tuple_u32TxOutZZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1u32TxOutZZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -2463,6 +4351,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u3
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1new
   (JNIEnv *, jclass, jbyteArray, jlongArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZ_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free
@@ -2471,6 +4367,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1TxidCVec_1C2Tuple_1u
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C2Tuple_1TxidCVec_1C2Tuple_1u32TxOutZZZZ_1free
   (JNIEnv *, jclass, jlongArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_BlockHashChannelMonitorZ_new
+ * Signature: ([BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_BlockHashChannelMonitorZ_free
@@ -2481,59 +4385,203 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonit
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_BlockHashChannelMonitorZ_new
- * Signature: ([BJ)J
+ * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_SpendableOutputDescriptorZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SpendableOutputDescriptorZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxOutAccessErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxOutAccessErrorZ_err
+ * Signature: (Lorg/ldk/enums/LDKAccessError;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1err
+  (JNIEnv *, jclass, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxOutAccessErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_TxOutAccessErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneAPIErrorZ_ok
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1ok
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneAPIErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneAPIErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NoneAPIErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_CResult_NoneAPIErrorZZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CResult_1NoneAPIErrorZZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_APIErrorZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1APIErrorZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_ChannelDetailsZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePaymentSendFailureZ_ok
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePaymentSendFailureZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NonePaymentSendFailureZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok
+ * Method:    CResult_NonePaymentSendFailureZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err
- * Signature: (J)J
+ * Method:    CVec_ChannelMonitorZ_free
+ * Signature: ([J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free
+  (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free
+ * Method:    C2Tuple_BlockHashChannelManagerZ_new
+ * Signature: ([BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1new
+  (JNIEnv *, jclass, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_BlockHashChannelManagerZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelMonitorZDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_u64u64Z_clone
+ * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_u64u64Z_free
- * Signature: (J)V
+ * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_u64u64Z_new
- * Signature: (JJ)J
+ * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1u64u64Z_1new
-  (JNIEnv *, jclass, jlong, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -2567,14 +4615,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDescri
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SpendableOutputDescriptorDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CVec_SignatureZ_free
- * Signature: ([[B)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free
-  (JNIEnv *, jclass, jobjectArray);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_SignatureCVec_SignatureZZ_clone
@@ -2583,14 +4623,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1SignatureZ_1free
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1clone
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_SignatureCVec_SignatureZZ_free
- * Signature: (J)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    C2Tuple_SignatureCVec_SignatureZZ_new
@@ -2599,6 +4631,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1Signat
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1new
   (JNIEnv *, jclass, jbyteArray, jobjectArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_SignatureCVec_SignatureZZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1SignatureCVec_1SignatureZZ_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok
@@ -2665,426 +4705,578 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignatureNoneZ_1clon
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChanKeySignerDecodeErrorZ_ok
+ * Method:    CResult_SignDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChanKeySignerDecodeErrorZ_err
+ * Method:    CResult_SignDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChanKeySignerDecodeErrorZ_free
+ * Method:    CResult_SignDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChanKeySignerDecodeErrorZ_clone
+ * Method:    CResult_SignDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChanKeySignerDecodeErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SignDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_InMemoryChannelKeysDecodeErrorZ_ok
- * Signature: (J)J
+ * Method:    CVec_CVec_u8ZZ_free
+ * Signature: ([[B)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemoryChannelKeysDecodeErrorZ_1ok
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1u8ZZ_1free
+  (JNIEnv *, jclass, jobjectArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_InMemoryChannelKeysDecodeErrorZ_err
- * Signature: (J)J
+ * Method:    CResult_CVec_CVec_u8ZZNoneZ_ok
+ * Signature: ([[B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemoryChannelKeysDecodeErrorZ_1err
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1CVec_1u8ZZNoneZ_1ok
+  (JNIEnv *, jclass, jobjectArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CVec_CVec_u8ZZNoneZ_err
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1CVec_1u8ZZNoneZ_1err
+  (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_InMemoryChannelKeysDecodeErrorZ_free
+ * Method:    CResult_CVec_CVec_u8ZZNoneZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InMemoryChannelKeysDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1CVec_1u8ZZNoneZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxOutAccessErrorZ_ok
+ * Method:    CResult_CVec_CVec_u8ZZNoneZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1CVec_1u8ZZNoneZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxOutAccessErrorZ_err
- * Signature: (Lorg/ldk/enums/LDKAccessError;)J
+ * Method:    CResult_InMemorySignerDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxOutAccessErrorZ_free
+ * Method:    CResult_InMemorySignerDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_InMemorySignerDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxOutAccessErrorZ_clone
+ * Method:    CResult_InMemorySignerDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxOutAccessErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InMemorySignerDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneAPIErrorZ_ok
+ * Method:    CVec_TxOutZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1TxOutZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * 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_1NoneAPIErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TransactionNoneZ_1err
   (JNIEnv *, jclass);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneAPIErrorZ_err
+ * 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:    CVec_RouteHopZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_CVec_RouteHopZZ_free
+ * Signature: ([[J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free
+  (JNIEnv *, jclass, jobjectArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RouteDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneAPIErrorZ_free
+ * Method:    CResult_RouteDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_RouteDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneAPIErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_ChannelDetailsZ_free
+ * Method:    CResult_RouteDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_RouteHintZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelDetailsZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free
   (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePaymentSendFailureZ_ok
- * Signature: ()J
+ * Method:    CResult_RouteLightningErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePaymentSendFailureZ_err
+ * Method:    CResult_RouteLightningErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePaymentSendFailureZ_free
+ * Method:    CResult_RouteLightningErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePaymentSendFailureZ_clone
+ * Method:    CResult_RouteLightningErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePaymentSendFailureZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_NetAddressZ_free
+ * Method:    CResult_NetAddressu8Z_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NetAddressu8Z_err
+ * Signature: (B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1err
+  (JNIEnv *, jclass, jbyte);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NetAddressu8Z_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_NetAddressu8Z_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_ok
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_UpdateAddHTLCZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NetAddressZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_UpdateFulfillHTLCZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free
+  (JNIEnv *, jclass, jlongArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CVec_UpdateFailHTLCZ_free
+ * Signature: ([J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free
   (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_ChannelMonitorZ_free
+ * Method:    CVec_UpdateFailMalformedHTLCZ_free
  * Signature: ([J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1ChannelMonitorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free
   (JNIEnv *, jclass, jlongArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_BlockHashChannelManagerZ_free
- * Signature: (J)V
+ * Method:    CResult_AcceptChannelDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_BlockHashChannelManagerZ_new
- * Signature: ([BJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelManagerZ_1new
-  (JNIEnv *, jclass, jbyteArray, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok
+ * Method:    CResult_AcceptChannelDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err
- * Signature: (J)J
+ * Method:    CResult_AcceptChannelDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_AcceptChannelDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1C2Tuple_1BlockHashChannelManagerZDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AcceptChannelDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetAddressu8Z_ok
+ * Method:    CResult_AnnouncementSignaturesDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetAddressu8Z_err
- * Signature: (B)J
+ * Method:    CResult_AnnouncementSignaturesDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1err
-  (JNIEnv *, jclass, jbyte);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetAddressu8Z_free
+ * Method:    CResult_AnnouncementSignaturesDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetAddressu8Z_clone
+ * Method:    CResult_AnnouncementSignaturesDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetAddressu8Z_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1AnnouncementSignaturesDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_ok
+ * Method:    CResult_ChannelReestablishDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_err
+ * Method:    CResult_ChannelReestablishDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CResult_NetAddressu8ZDecodeErrorZ_free
+ * Method:    CResult_ChannelReestablishDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CResult_1NetAddressu8ZDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_u64Z_free
- * Signature: ([J)V
+ * Method:    CResult_ChannelReestablishDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u64Z_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_UpdateAddHTLCZ_free
- * Signature: ([J)V
+ * Method:    CResult_ClosingSignedDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateAddHTLCZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_UpdateFulfillHTLCZ_free
- * Signature: ([J)V
+ * Method:    CResult_ClosingSignedDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFulfillHTLCZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_UpdateFailHTLCZ_free
- * Signature: ([J)V
+ * Method:    CResult_ClosingSignedDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailHTLCZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_UpdateFailMalformedHTLCZ_free
- * Signature: ([J)V
+ * Method:    CResult_ClosingSignedDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1UpdateFailMalformedHTLCZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ClosingSignedDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolLightningErrorZ_ok
- * Signature: (Z)J
+ * Method:    CResult_CommitmentSignedDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1ok
-  (JNIEnv *, jclass, jboolean);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolLightningErrorZ_err
+ * Method:    CResult_CommitmentSignedDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolLightningErrorZ_free
+ * Method:    CResult_CommitmentSignedDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolLightningErrorZ_clone
+ * Method:    CResult_CommitmentSignedDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolLightningErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CommitmentSignedDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free
- * Signature: (J)V
+ * Method:    CResult_FundingCreatedDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new
- * Signature: (JJJ)J
+ * Method:    CResult_FundingCreatedDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZ_1new
-  (JNIEnv *, jclass, jlong, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free
- * Signature: ([J)V
+ * Method:    CResult_FundingCreatedDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1C3Tuple_1ChannelAnnouncementChannelUpdateChannelUpdateZZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_NodeAnnouncementZ_free
- * Signature: ([J)V
+ * Method:    CResult_FundingCreatedDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1NodeAnnouncementZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingCreatedDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneLightningErrorZ_ok
- * Signature: ()J
+ * Method:    CResult_FundingSignedDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneLightningErrorZ_err
+ * Method:    CResult_FundingSignedDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneLightningErrorZ_free
+ * Method:    CResult_FundingSignedDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NoneLightningErrorZ_clone
+ * Method:    CResult_FundingSignedDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NoneLightningErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingSignedDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelReestablishDecodeErrorZ_ok
+ * Method:    CResult_FundingLockedDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelReestablishDecodeErrorZ_err
+ * Method:    CResult_FundingLockedDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ChannelReestablishDecodeErrorZ_free
+ * Method:    CResult_FundingLockedDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelReestablishDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_FundingLockedDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1FundingLockedDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -3113,690 +5305,714 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1fre
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PingDecodeErrorZ_ok
+ * Method:    CResult_InitDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1InitDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PingDecodeErrorZ_err
+ * Method:    CResult_OpenChannelDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PingDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_OpenChannelDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PongDecodeErrorZ_ok
- * Signature: (J)J
+ * Method:    CResult_OpenChannelDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PongDecodeErrorZ_err
+ * Method:    CResult_OpenChannelDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1OpenChannelDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PongDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_RevokeAndACKDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok
+ * Method:    CResult_RevokeAndACKDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_err
- * Signature: (J)J
+ * Method:    CResult_RevokeAndACKDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_RevokeAndACKDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RevokeAndACKDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_ok
+ * Method:    CResult_ShutdownDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_err
+ * Method:    CResult_ShutdownDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_free
+ * Method:    CResult_ShutdownDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ErrorMessageDecodeErrorZ_ok
+ * Method:    CResult_ShutdownDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ShutdownDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ErrorMessageDecodeErrorZ_err
+ * Method:    CResult_UpdateFailHTLCDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ErrorMessageDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UpdateFailHTLCDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok
- * Signature: (J)J
+ * Method:    CResult_UpdateFailHTLCDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_err
+ * Method:    CResult_UpdateFailHTLCDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailHTLCDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_ok
+ * Method:    CResult_UpdateFailMalformedHTLCDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_err
- * Signature: (J)J
+ * Method:    CResult_UpdateFailMalformedHTLCDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFailMalformedHTLCDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok
+ * Method:    CResult_UpdateFeeDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_err
+ * Method:    CResult_UpdateFeeDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_free
+ * Method:    CResult_UpdateFeeDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryChannelRangeDecodeErrorZ_ok
+ * Method:    CResult_UpdateFeeDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFeeDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryChannelRangeDecodeErrorZ_err
+ * Method:    CResult_UpdateFulfillHTLCDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_QueryChannelRangeDecodeErrorZ_free
+ * Method:    CResult_UpdateFulfillHTLCDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UpdateFulfillHTLCDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyChannelRangeDecodeErrorZ_ok
+ * Method:    CResult_UpdateFulfillHTLCDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateFulfillHTLCDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyChannelRangeDecodeErrorZ_err
+ * Method:    CResult_UpdateAddHTLCDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_ReplyChannelRangeDecodeErrorZ_free
+ * Method:    CResult_UpdateAddHTLCDecodeErrorZ_err
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_UpdateAddHTLCDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_GossipTimestampFilterDecodeErrorZ_ok
+ * Method:    CResult_UpdateAddHTLCDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UpdateAddHTLCDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_GossipTimestampFilterDecodeErrorZ_err
+ * Method:    CResult_PingDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_GossipTimestampFilterDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_PingDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_PublicKeyZ_free
- * Signature: ([[B)V
+ * Method:    CResult_PingDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1PublicKeyZ_1free
-  (JNIEnv *, jclass, jobjectArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_u8Z_free
- * Signature: ([B)V
+ * Method:    CResult_PingDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1u8Z_1free
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PingDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_u8ZPeerHandleErrorZ_ok
- * Signature: ([B)J
+ * Method:    CResult_PongDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1ok
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_u8ZPeerHandleErrorZ_err
+ * Method:    CResult_PongDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_u8ZPeerHandleErrorZ_free
+ * Method:    CResult_PongDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_u8ZPeerHandleErrorZ_clone
+ * Method:    CResult_PongDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1u8ZPeerHandleErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PongDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePeerHandleErrorZ_ok
- * Signature: ()J
+ * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1ok
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePeerHandleErrorZ_err
+ * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePeerHandleErrorZ_free
+ * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NonePeerHandleErrorZ_clone
+ * Method:    CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NonePeerHandleErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelAnnouncementDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolPeerHandleErrorZ_ok
- * Signature: (Z)J
+ * Method:    CResult_ChannelAnnouncementDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1ok
-  (JNIEnv *, jclass, jboolean);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolPeerHandleErrorZ_err
+ * Method:    CResult_ChannelAnnouncementDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolPeerHandleErrorZ_free
+ * Method:    CResult_ChannelAnnouncementDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_boolPeerHandleErrorZ_clone
+ * Method:    CResult_ChannelAnnouncementDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1boolPeerHandleErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelAnnouncementDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SecretKeySecpErrorZ_ok
- * Signature: ([B)J
+ * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1ok
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SecretKeySecpErrorZ_err
- * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_SecretKeySecpErrorZ_free
+ * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1SecretKeySecpErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecpErrorZ_ok
- * Signature: ([B)J
+ * Method:    CResult_UnsignedChannelUpdateDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1ok
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedChannelUpdateDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecpErrorZ_err
- * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ * Method:    CResult_ChannelUpdateDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_PublicKeySecpErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_ChannelUpdateDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1PublicKeySecpErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxCreationKeysSecpErrorZ_ok
- * Signature: (J)J
+ * Method:    CResult_ChannelUpdateDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxCreationKeysSecpErrorZ_err
- * Signature: (Lorg/ldk/enums/LDKSecp256k1Error;)J
+ * Method:    CResult_ChannelUpdateDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1err
-  (JNIEnv *, jclass, jobject);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ChannelUpdateDecodeErrorZ_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TxCreationKeysSecpErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_ErrorMessageDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TxCreationKeysSecpErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TrustedCommitmentTransactionNoneZ_ok
+ * Method:    CResult_ErrorMessageDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TrustedCommitmentTransactionNoneZ_err
- * Signature: ()J
+ * Method:    CResult_ErrorMessageDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1err
-  (JNIEnv *, jclass);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_TrustedCommitmentTransactionNoneZ_free
- * Signature: (J)V
+ * Method:    CResult_ErrorMessageDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1TrustedCommitmentTransactionNoneZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ErrorMessageDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_SignatureZNoneZ_ok
- * Signature: ([[B)J
+ * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1ok
-  (JNIEnv *, jclass, jobjectArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_SignatureZNoneZ_err
- * Signature: ()J
+ * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1err
-  (JNIEnv *, jclass);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_SignatureZNoneZ_free
+ * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_CVec_SignatureZNoneZ_clone
+ * Method:    CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1CVec_1SignatureZNoneZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1UnsignedNodeAnnouncementDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_RouteHopZ_free
- * Signature: ([J)V
+ * Method:    CResult_NodeAnnouncementDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHopZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1ok
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_CVec_RouteHopZZ_free
- * Signature: ([[J)V
+ * Method:    CResult_NodeAnnouncementDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1CVec_1RouteHopZZ_1free
-  (JNIEnv *, jclass, jobjectArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteDecodeErrorZ_ok
- * Signature: (J)J
+ * Method:    CResult_NodeAnnouncementDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteDecodeErrorZ_err
+ * Method:    CResult_NodeAnnouncementDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CVec_RouteHintZ_free
- * Signature: ([J)V
+ * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_err
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CVec_1RouteHintZ_1free
-  (JNIEnv *, jclass, jlongArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1err
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteLightningErrorZ_ok
- * Signature: (J)J
+ * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1ok
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteLightningErrorZ_err
+ * Method:    CResult_QueryShortChannelIdsDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryShortChannelIdsDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RouteLightningErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RouteLightningErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RoutingFeesDecodeErrorZ_ok
+ * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RoutingFeesDecodeErrorZ_err
- * Signature: (J)J
+ * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1err
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_RoutingFeesDecodeErrorZ_free
- * Signature: (J)V
+ * Method:    CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1RoutingFeesDecodeErrorZ_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyShortChannelIdsEndDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_ok
+ * Method:    CResult_QueryChannelRangeDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_err
+ * Method:    CResult_QueryChannelRangeDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_free
+ * Method:    CResult_QueryChannelRangeDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeAnnouncementInfoDecodeErrorZ_clone
+ * Method:    CResult_QueryChannelRangeDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeAnnouncementInfoDecodeErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1QueryChannelRangeDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeInfoDecodeErrorZ_ok
+ * Method:    CResult_ReplyChannelRangeDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeInfoDecodeErrorZ_err
+ * Method:    CResult_ReplyChannelRangeDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeInfoDecodeErrorZ_free
+ * Method:    CResult_ReplyChannelRangeDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NodeInfoDecodeErrorZ_clone
+ * Method:    CResult_ReplyChannelRangeDecodeErrorZ_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NodeInfoDecodeErrorZ_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1ReplyChannelRangeDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetworkGraphDecodeErrorZ_ok
+ * Method:    CResult_GossipTimestampFilterDecodeErrorZ_ok
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1ok
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1ok
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetworkGraphDecodeErrorZ_err
+ * Method:    CResult_GossipTimestampFilterDecodeErrorZ_err
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1err
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1err
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CResult_NetworkGraphDecodeErrorZ_free
+ * Method:    CResult_GossipTimestampFilterDecodeErrorZ_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1NetworkGraphDecodeErrorZ_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CResult_GossipTimestampFilterDecodeErrorZ_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CResult_1GossipTimestampFilterDecodeErrorZ_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -3903,14 +6119,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Logger_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelHandshakeConfig_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelHandshakeConfig_get_minimum_depth
@@ -3967,6 +6175,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1set_1o
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1new
   (JNIEnv *, jclass, jint, jshort, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelHandshakeConfig_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelHandshakeConfig_default
@@ -3983,14 +6199,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeConfig_1defau
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelHandshakeLimits_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelHandshakeLimits_get_min_funding_satoshis
@@ -4159,6 +6367,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1set_1t
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1new
   (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jshort, jlong, jlong, jint, jboolean, jshort);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelHandshakeLimits_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelHandshakeLimits_default
@@ -4175,14 +6391,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelHandshakeLimits_1defau
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelConfig_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelConfig_get_fee_proportional_millionths
@@ -4239,6 +6447,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1set_1commit_1up
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1new
   (JNIEnv *, jclass, jint, jboolean, jboolean);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelConfig_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelConfig_default
@@ -4271,14 +6487,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelConfig_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    UserConfig_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UserConfig_get_own_channel_config
@@ -4335,6 +6543,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UserConfig_1set_1channel_1opti
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1new
   (JNIEnv *, jclass, jlong, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    UserConfig_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UserConfig_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UserConfig_default
@@ -4359,6 +6575,14 @@ JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_AccessError_1clone
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Access_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Listen_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Listen_1free
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Watch_free
@@ -4455,14 +6679,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainMonitor_1as_1EventsProvi
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitorUpdate_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMonitorUpdate_get_update_id
@@ -4479,6 +6695,14 @@ 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_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitorUpdate_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelMonitorUpdate_write
@@ -4569,187 +6793,395 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCUpdate_1read
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_free
- * Signature: (J)V
+ * Method:    ChannelMonitor_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_update_monitor
+ * Signature: (JJJJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_get_latest_update_id
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_get_funding_txo
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_get_and_clear_pending_monitor_events
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_get_and_clear_pending_events
+ * Signature: (J)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_get_latest_holder_commitment_txn
+ * Signature: (JJ)[[B
+ */
+JNIEXPORT jobjectArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1holder_1commitment_1txn
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_block_connected
+ * Signature: (J[B[JIJJJ)[J
+ */
+JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected
+  (JNIEnv *, jclass, jlong, jbyteArray, jlongArray, jint, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelMonitor_block_disconnected
+ * Signature: (J[BIJJJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1disconnected
+  (JNIEnv *, jclass, jlong, jbyteArray, jint, jlong, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Persist_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    C2Tuple_BlockHashChannelMonitorZ_read
+ * Signature: ([BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1read
+  (JNIEnv *, jclass, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutPoint_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutPoint_get_txid
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutPoint_set_txid
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutPoint_get_index
+ * Signature: (J)S
+ */
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutPoint_set_index
+ * Signature: (JS)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1index
+  (JNIEnv *, jclass, jlong, jshort);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutPoint_new
+ * Signature: ([BS)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new
+  (JNIEnv *, jclass, jbyteArray, jshort);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutPoint_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1clone
+  (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
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    OutPoint_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DelayedPaymentOutputDescriptor_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DelayedPaymentOutputDescriptor_get_outpoint
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1outpoint
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DelayedPaymentOutputDescriptor_set_outpoint
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1outpoint
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DelayedPaymentOutputDescriptor_get_per_commitment_point
+ * Signature: (J)[B
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1free
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1per_1commitment_1point
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_clone
- * Signature: (J)J
+ * Method:    DelayedPaymentOutputDescriptor_set_per_commitment_point
+ * Signature: (J[B)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1clone
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1per_1commitment_1point
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_write
- * Signature: (J)[B
+ * Method:    DelayedPaymentOutputDescriptor_get_to_self_delay
+ * Signature: (J)S
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1write
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1to_1self_1delay
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_update_monitor
- * Signature: (JJJJJ)J
+ * Method:    DelayedPaymentOutputDescriptor_set_to_self_delay
+ * Signature: (JS)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1update_1monitor
-  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1to_1self_1delay
+  (JNIEnv *, jclass, jlong, jshort);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_get_latest_update_id
- * Signature: (J)J
+ * Method:    DelayedPaymentOutputDescriptor_set_output
+ * Signature: (JJ)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1latest_1update_1id
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1output
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_get_funding_txo
- * Signature: (J)J
+ * Method:    DelayedPaymentOutputDescriptor_get_revocation_pubkey
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1funding_1txo
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1revocation_1pubkey
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_get_and_clear_pending_monitor_events
- * Signature: (J)[J
+ * Method:    DelayedPaymentOutputDescriptor_set_revocation_pubkey
+ * Signature: (J[B)V
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1monitor_1events
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1revocation_1pubkey
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_get_and_clear_pending_events
- * Signature: (J)[J
+ * Method:    DelayedPaymentOutputDescriptor_get_channel_keys_id
+ * Signature: (J)[B
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1get_1and_1clear_1pending_1events
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1keys_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_get_latest_holder_commitment_txn
- * Signature: (JJ)[[B
+ * Method:    DelayedPaymentOutputDescriptor_set_channel_keys_id
+ * Signature: (J[B)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_DelayedPaymentOutputDescriptor_1set_1channel_1keys_1id
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_block_connected
- * Signature: (J[B[JIJJJ)[J
+ * Method:    DelayedPaymentOutputDescriptor_get_channel_value_satoshis
+ * Signature: (J)J
  */
-JNIEXPORT jlongArray JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1connected
-  (JNIEnv *, jclass, jlong, jbyteArray, jlongArray, jint, jlong, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1get_1channel_1value_1satoshis
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelMonitor_block_disconnected
- * Signature: (J[BIJJJ)V
+ * Method:    DelayedPaymentOutputDescriptor_set_channel_value_satoshis
+ * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelMonitor_1block_1disconnected
-  (JNIEnv *, jclass, jlong, jbyteArray, jint, jlong, jlong, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1set_1channel_1value_1satoshis
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Persist_free
- * Signature: (J)V
+ * Method:    DelayedPaymentOutputDescriptor_new
+ * Signature: (J[BSJ[B[BJ)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Persist_1free
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1new
+  (JNIEnv *, jclass, jlong, jbyteArray, jshort, jlong, jbyteArray, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    C2Tuple_BlockHashChannelMonitorZ_read
- * Signature: ([BJ)J
+ * Method:    DelayedPaymentOutputDescriptor_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_C2Tuple_1BlockHashChannelMonitorZ_1read
-  (JNIEnv *, jclass, jbyteArray, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DelayedPaymentOutputDescriptor_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_free
+ * Method:    StaticPaymentOutputDescriptor_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_clone
+ * Method:    StaticPaymentOutputDescriptor_get_outpoint
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1get_1outpoint
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_get_txid
- * Signature: (J)[B
+ * Method:    StaticPaymentOutputDescriptor_set_outpoint
+ * Signature: (JJ)V
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1txid
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1outpoint
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_set_txid
- * Signature: (J[B)V
+ * Method:    StaticPaymentOutputDescriptor_set_output
+ * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1txid
-  (JNIEnv *, jclass, jlong, jbyteArray);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1output
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_get_index
- * Signature: (J)S
+ * Method:    StaticPaymentOutputDescriptor_get_channel_keys_id
+ * Signature: (J)[B
  */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_OutPoint_1get_1index
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1get_1channel_1keys_1id
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_set_index
- * Signature: (JS)V
+ * Method:    StaticPaymentOutputDescriptor_set_channel_keys_id
+ * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OutPoint_1set_1index
-  (JNIEnv *, jclass, jlong, jshort);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1channel_1keys_1id
+  (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_new
- * Signature: ([BS)J
+ * Method:    StaticPaymentOutputDescriptor_get_channel_value_satoshis
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1new
-  (JNIEnv *, jclass, jbyteArray, jshort);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1get_1channel_1value_1satoshis
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_to_channel_id
- * Signature: (J)[B
+ * Method:    StaticPaymentOutputDescriptor_set_channel_value_satoshis
+ * Signature: (JJ)V
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1to_1channel_1id
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1set_1channel_1value_1satoshis
+  (JNIEnv *, jclass, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_write
- * Signature: (J)[B
+ * Method:    StaticPaymentOutputDescriptor_new
+ * Signature: (JJ[BJ)J
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_OutPoint_1write
-  (JNIEnv *, jclass, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1new
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OutPoint_read
- * Signature: ([B)J
+ * Method:    StaticPaymentOutputDescriptor_clone
+ * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OutPoint_1read
-  (JNIEnv *, jclass, jbyteArray);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_StaticPaymentOutputDescriptor_1clone
+  (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -4785,18 +7217,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_SpendableOutputDescriptor_1re
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_clone
+ * Method:    Sign_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Sign_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelKeys_free
+ * Method:    Sign_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelKeys_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Sign_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -4809,194 +7241,210 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysInterface_1free
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_free
+ * Method:    InMemorySigner_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1free
-  (JNIEnv *, jclass, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_get_funding_key
+ * Method:    InMemorySigner_get_funding_key
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1funding_1key
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1funding_1key
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_set_funding_key
+ * Method:    InMemorySigner_set_funding_key
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1funding_1key
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1funding_1key
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_get_revocation_base_key
+ * Method:    InMemorySigner_get_revocation_base_key
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1revocation_1base_1key
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1revocation_1base_1key
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_set_revocation_base_key
+ * Method:    InMemorySigner_set_revocation_base_key
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1revocation_1base_1key
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1revocation_1base_1key
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_get_payment_key
+ * Method:    InMemorySigner_get_payment_key
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1payment_1key
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1payment_1key
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_set_payment_key
+ * Method:    InMemorySigner_set_payment_key
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1payment_1key
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1payment_1key
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_get_delayed_payment_base_key
+ * Method:    InMemorySigner_get_delayed_payment_base_key
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1delayed_1payment_1base_1key
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1delayed_1payment_1base_1key
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_set_delayed_payment_base_key
+ * Method:    InMemorySigner_set_delayed_payment_base_key
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1delayed_1payment_1base_1key
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1delayed_1payment_1base_1key
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_get_htlc_base_key
+ * Method:    InMemorySigner_get_htlc_base_key
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1htlc_1base_1key
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1htlc_1base_1key
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_set_htlc_base_key
+ * Method:    InMemorySigner_set_htlc_base_key
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1htlc_1base_1key
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1htlc_1base_1key
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_get_commitment_seed
+ * Method:    InMemorySigner_get_commitment_seed
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1commitment_1seed
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1commitment_1seed
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_set_commitment_seed
+ * Method:    InMemorySigner_set_commitment_seed
  * Signature: (J[B)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1set_1commitment_1seed
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1set_1commitment_1seed
   (JNIEnv *, jclass, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_new
- * Signature: ([B[B[B[B[B[BJJ)J
+ * Method:    InMemorySigner_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InMemorySigner_new
+ * Signature: ([B[B[B[B[B[BJ[B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1new
-  (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jlong);
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1new
+  (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jlong, jbyteArray);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_counterparty_pubkeys
+ * Method:    InMemorySigner_counterparty_pubkeys
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counterparty_1pubkeys
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1counterparty_1pubkeys
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_counterparty_selected_contest_delay
+ * Method:    InMemorySigner_counterparty_selected_contest_delay
  * Signature: (J)S
  */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1counterparty_1selected_1contest_1delay
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1counterparty_1selected_1contest_1delay
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_holder_selected_contest_delay
+ * Method:    InMemorySigner_holder_selected_contest_delay
  * Signature: (J)S
  */
-JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1holder_1selected_1contest_1delay
+JNIEXPORT jshort JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1holder_1selected_1contest_1delay
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_is_outbound
+ * Method:    InMemorySigner_is_outbound
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1is_1outbound
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1is_1outbound
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_funding_outpoint
+ * Method:    InMemorySigner_funding_outpoint
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1funding_1outpoint
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1funding_1outpoint
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_get_channel_parameters
+ * Method:    InMemorySigner_get_channel_parameters
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1get_1channel_1parameters
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1get_1channel_1parameters
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_as_ChannelKeys
+ * Method:    InMemorySigner_sign_counterparty_payment_input
+ * Signature: (J[BJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1sign_1counterparty_1payment_1input
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InMemorySigner_sign_dynamic_p2wsh_input
+ * Signature: (J[BJJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1sign_1dynamic_1p2wsh_1input
+  (JNIEnv *, jclass, jlong, jbyteArray, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InMemorySigner_as_Sign
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1as_1ChannelKeys
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1as_1Sign
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_write
+ * Method:    InMemorySigner_write
  * Signature: (J)[B
  */
-JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1write
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1write
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    InMemoryChannelKeys_read
+ * Method:    InMemorySigner_read
  * Signature: ([B)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemoryChannelKeys_1read
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InMemorySigner_1read
   (JNIEnv *, jclass, jbyteArray);
 
 /*
@@ -5010,18 +7458,26 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_KeysManager_1free
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    KeysManager_new
- * Signature: ([BLorg/ldk/enums/LDKNetwork;JI)J
+ * Signature: ([BJI)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1new
-  (JNIEnv *, jclass, jbyteArray, jobject, jlong, jint);
+  (JNIEnv *, jclass, jbyteArray, jlong, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    KeysManager_derive_channel_keys
- * Signature: (JJJJ)J
+ * Signature: (JJ[B)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1derive_1channel_1keys
-  (JNIEnv *, jclass, jlong, jlong, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    KeysManager_spend_spendable_outputs
+ * Signature: (J[J[J[BI)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_KeysManager_1spend_1spendable_1outputs
+  (JNIEnv *, jclass, jlong, jlongArray, jlongArray, jbyteArray, jint);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -5041,18 +7497,74 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1free
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelDetails_free
+ * Method:    ChainParameters_free
  * Signature: (J)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainParameters_1free
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelDetails_clone
+ * Method:    ChainParameters_get_network
+ * Signature: (J)Lorg/ldk/enums/LDKNetwork;
+ */
+JNIEXPORT jobject JNICALL Java_org_ldk_impl_bindings_ChainParameters_1get_1network
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChainParameters_set_network
+ * Signature: (JLorg/ldk/enums/LDKNetwork;)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainParameters_1set_1network
+  (JNIEnv *, jclass, jlong, jobject);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChainParameters_get_latest_hash
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChainParameters_1get_1latest_1hash
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChainParameters_set_latest_hash
+ * Signature: (J[B)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainParameters_1set_1latest_1hash
+  (JNIEnv *, jclass, jlong, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChainParameters_get_latest_height
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainParameters_1get_1latest_1height
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChainParameters_set_latest_height
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChainParameters_1set_1latest_1height
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChainParameters_new
+ * Signature: (Lorg/ldk/enums/LDKNetwork;[BJ)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChainParameters_1new
+  (JNIEnv *, jclass, jobject, jbyteArray, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelDetails_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5183,6 +7695,14 @@ JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1get_1is_1l
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1set_1is_1live
   (JNIEnv *, jclass, jlong, jboolean);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelDetails_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelDetails_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PaymentSendFailure_free
@@ -5202,10 +7722,10 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PaymentSendFailure_1clone
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_new
- * Signature: (Lorg/ldk/enums/LDKNetwork;JJJJJJJ)J
+ * Signature: (JJJJJJJ)J
  */
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1new
-  (JNIEnv *, jclass, jobject, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
+  (JNIEnv *, jclass, jlong, jlong, jlong, jlong, jlong, jlong, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
@@ -5343,6 +7863,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1MessageSe
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1EventsProvider
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelManager_as_Listen
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelManager_1as_1Listen
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_block_connected
@@ -5359,6 +7887,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1connect
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1block_1disconnected
   (JNIEnv *, jclass, jlong, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelManager_await_persistable_update
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelManager_1await_1persistable_1update
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelManager_as_ChannelMessageHandler
@@ -5521,26 +8057,42 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1free
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Init_clone
+ * Method:    Init_get_features
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1get_1features
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ErrorMessage_free
- * Signature: (J)V
+ * Method:    Init_set_features
+ * Signature: (JJ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Init_1set_1features
+  (JNIEnv *, jclass, jlong, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Init_new
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1new
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ErrorMessage_clone
+ * Method:    Init_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Init_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ErrorMessage_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5585,18 +8137,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Ping_free
- * Signature: (J)V
+ * Method:    ErrorMessage_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorMessage_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Ping_clone
- * Signature: (J)J
+ * Method:    Ping_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Ping_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5641,18 +8193,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Pong_free
- * Signature: (J)V
+ * Method:    Ping_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Ping_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Pong_clone
- * Signature: (J)J
+ * Method:    Pong_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Pong_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5681,18 +8233,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_free
- * Signature: (J)V
+ * Method:    Pong_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Pong_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    OpenChannel_clone
- * Signature: (J)J
+ * Method:    OpenChannel_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -5985,18 +8537,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_OpenChannel_1set_1channel_1fla
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_free
- * Signature: (J)V
+ * Method:    OpenChannel_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_OpenChannel_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AcceptChannel_clone
- * Signature: (J)J
+ * Method:    AcceptChannel_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6225,18 +8777,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1set_1first_1per
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingCreated_free
- * Signature: (J)V
+ * Method:    AcceptChannel_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AcceptChannel_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingCreated_clone
- * Signature: (J)J
+ * Method:    FundingCreated_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingCreated_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6313,18 +8865,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingSigned_free
- * Signature: (J)V
+ * Method:    FundingCreated_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingCreated_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingSigned_clone
- * Signature: (J)J
+ * Method:    FundingSigned_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingSigned_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6369,18 +8921,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingLocked_free
- * Signature: (J)V
+ * Method:    FundingSigned_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingSigned_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    FundingLocked_clone
- * Signature: (J)J
+ * Method:    FundingLocked_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_FundingLocked_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6425,18 +8977,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Shutdown_free
- * Signature: (J)V
+ * Method:    FundingLocked_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_FundingLocked_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Shutdown_clone
- * Signature: (J)J
+ * Method:    Shutdown_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Shutdown_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6481,18 +9033,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ClosingSigned_free
- * Signature: (J)V
+ * Method:    Shutdown_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Shutdown_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ClosingSigned_clone
- * Signature: (J)J
+ * Method:    ClosingSigned_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6553,18 +9105,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateAddHTLC_free
- * Signature: (J)V
+ * Method:    ClosingSigned_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ClosingSigned_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateAddHTLC_clone
- * Signature: (J)J
+ * Method:    UpdateAddHTLC_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6649,18 +9201,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1set_1cltv_1expi
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFulfillHTLC_free
- * Signature: (J)V
+ * Method:    UpdateAddHTLC_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateAddHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFulfillHTLC_clone
- * Signature: (J)J
+ * Method:    UpdateFulfillHTLC_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6721,18 +9273,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFailHTLC_free
- * Signature: (J)V
+ * Method:    UpdateFulfillHTLC_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFulfillHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFailHTLC_clone
- * Signature: (J)J
+ * Method:    UpdateFailHTLC_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6769,18 +9321,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1set_1htlc_1id
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFailMalformedHTLC_free
- * Signature: (J)V
+ * Method:    UpdateFailHTLC_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFailMalformedHTLC_clone
- * Signature: (J)J
+ * Method:    UpdateFailMalformedHTLC_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6833,18 +9385,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1set_1
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CommitmentSigned_free
- * Signature: (J)V
+ * Method:    UpdateFailMalformedHTLC_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFailMalformedHTLC_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CommitmentSigned_clone
- * Signature: (J)J
+ * Method:    CommitmentSigned_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6897,18 +9449,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RevokeAndACK_free
- * Signature: (J)V
+ * Method:    CommitmentSigned_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentSigned_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RevokeAndACK_clone
- * Signature: (J)J
+ * Method:    RevokeAndACK_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -6969,18 +9521,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFee_free
- * Signature: (J)V
+ * Method:    RevokeAndACK_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RevokeAndACK_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UpdateFee_clone
- * Signature: (J)J
+ * Method:    UpdateFee_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UpdateFee_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7025,18 +9577,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    DataLossProtect_free
- * Signature: (J)V
+ * Method:    UpdateFee_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UpdateFee_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    DataLossProtect_clone
- * Signature: (J)J
+ * Method:    DataLossProtect_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7081,18 +9633,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelReestablish_free
- * Signature: (J)V
+ * Method:    DataLossProtect_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DataLossProtect_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelReestablish_clone
- * Signature: (J)J
+ * Method:    ChannelReestablish_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7145,18 +9697,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1set_1next_
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AnnouncementSignatures_free
- * Signature: (J)V
+ * Method:    ChannelReestablish_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelReestablish_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    AnnouncementSignatures_clone
- * Signature: (J)J
+ * Method:    AnnouncementSignatures_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7231,6 +9783,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1set_1b
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1new
   (JNIEnv *, jclass, jbyteArray, jlong, jbyteArray, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    AnnouncementSignatures_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_AnnouncementSignatures_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NetAddress_free
@@ -7271,14 +9831,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Result_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    UnsignedNodeAnnouncement_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    UnsignedNodeAnnouncement_get_features
@@ -7369,18 +9921,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1set_
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    NodeAnnouncement_free
- * Signature: (J)V
+ * Method:    UnsignedNodeAnnouncement_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedNodeAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    NodeAnnouncement_clone
- * Signature: (J)J
+ * Method:    NodeAnnouncement_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7425,18 +9977,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UnsignedChannelAnnouncement_free
- * Signature: (J)V
+ * Method:    NodeAnnouncement_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UnsignedChannelAnnouncement_clone
- * Signature: (J)J
+ * Method:    UnsignedChannelAnnouncement_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7553,18 +10105,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1s
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelAnnouncement_free
- * Signature: (J)V
+ * Method:    UnsignedChannelAnnouncement_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelAnnouncement_clone
- * Signature: (J)J
+ * Method:    ChannelAnnouncement_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7657,18 +10209,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UnsignedChannelUpdate_free
- * Signature: (J)V
+ * Method:    ChannelAnnouncement_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelAnnouncement_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    UnsignedChannelUpdate_clone
- * Signature: (J)J
+ * Method:    UnsignedChannelUpdate_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7801,18 +10353,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1set_1fe
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelUpdate_free
- * Signature: (J)V
+ * Method:    UnsignedChannelUpdate_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_UnsignedChannelUpdate_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ChannelUpdate_clone
- * Signature: (J)J
+ * Method:    ChannelUpdate_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7857,18 +10409,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    QueryChannelRange_free
- * Signature: (J)V
+ * Method:    ChannelUpdate_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelUpdate_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    QueryChannelRange_clone
- * Signature: (J)J
+ * Method:    QueryChannelRange_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7929,18 +10481,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyChannelRange_free
- * Signature: (J)V
+ * Method:    QueryChannelRange_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryChannelRange_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyChannelRange_clone
- * Signature: (J)J
+ * Method:    ReplyChannelRange_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -7993,18 +10545,18 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1number
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyChannelRange_get_full_information
+ * Method:    ReplyChannelRange_get_sync_complete
  * Signature: (J)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1full_1information
+JNIEXPORT jboolean JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1get_1sync_1complete
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyChannelRange_set_full_information
+ * Method:    ReplyChannelRange_set_sync_complete
  * Signature: (JZ)V
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1full_1information
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1set_1sync_1complete
   (JNIEnv *, jclass, jlong, jboolean);
 
 /*
@@ -8025,18 +10577,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    QueryShortChannelIds_free
- * Signature: (J)V
+ * Method:    ReplyChannelRange_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyChannelRange_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    QueryShortChannelIds_clone
- * Signature: (J)J
+ * Method:    QueryShortChannelIds_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -8073,18 +10625,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyShortChannelIdsEnd_free
- * Signature: (J)V
+ * Method:    QueryShortChannelIds_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_QueryShortChannelIds_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    ReplyShortChannelIdsEnd_clone
- * Signature: (J)J
+ * Method:    ReplyShortChannelIdsEnd_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -8129,18 +10681,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    GossipTimestampFilter_free
- * Signature: (J)V
+ * Method:    ReplyShortChannelIdsEnd_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ReplyShortChannelIdsEnd_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    GossipTimestampFilter_clone
- * Signature: (J)J
+ * Method:    GossipTimestampFilter_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -8199,6 +10751,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1set_1ti
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1new
   (JNIEnv *, jclass, jbyteArray, jint, jint);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    GossipTimestampFilter_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ErrorAction_free
@@ -8223,14 +10783,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErrorAction_1clone
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_LightningError_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    LightningError_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LightningError_get_err
@@ -8273,18 +10825,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CommitmentUpdate_free
- * Signature: (J)V
+ * Method:    LightningError_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_LightningError_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CommitmentUpdate_clone
- * Signature: (J)J
+ * Method:    CommitmentUpdate_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -8359,6 +10911,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1set_1commitm
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1new
   (JNIEnv *, jclass, jlongArray, jlongArray, jlongArray, jlongArray, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CommitmentUpdate_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CommitmentUpdate_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCFailChannelUpdate_free
@@ -8887,6 +11447,70 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1read
 JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_GossipTimestampFilter_1write
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IgnoringMessageHandler_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IgnoringMessageHandler_new
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1new
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IgnoringMessageHandler_as_MessageSendEventsProvider
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1MessageSendEventsProvider
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    IgnoringMessageHandler_as_RoutingMessageHandler
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_IgnoringMessageHandler_1as_1RoutingMessageHandler
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ErroringMessageHandler_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ErroringMessageHandler_1free
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ErroringMessageHandler_new
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErroringMessageHandler_1new
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ErroringMessageHandler_as_MessageSendEventsProvider
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErroringMessageHandler_1as_1MessageSendEventsProvider
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ErroringMessageHandler_as_ChannelMessageHandler
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ErroringMessageHandler_1as_1ChannelMessageHandler
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    MessageHandler_free
@@ -8959,14 +11583,6 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_SocketDescriptor_1free
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    PeerHandleError_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PeerHandleError_get_no_connection_possible
@@ -8991,6 +11607,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1set_1no_1conn
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1new
   (JNIEnv *, jclass, jboolean);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    PeerHandleError_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_PeerHandleError_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    PeerManager_free
@@ -9127,14 +11751,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_derive_1public_1revocation_1k
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    TxCreationKeys_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxCreationKeys_get_per_commitment_point
@@ -9223,6 +11839,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1set_1broadcast
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1new
   (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    TxCreationKeys_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    TxCreationKeys_write
@@ -9247,14 +11871,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TxCreationKeys_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelPublicKeys_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelPublicKeys_get_funding_pubkey
@@ -9343,6 +11959,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1set_1htlc_1
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1new
   (JNIEnv *, jclass, jbyteArray, jbyteArray, jbyteArray, jbyteArray, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelPublicKeys_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelPublicKeys_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelPublicKeys_write
@@ -9391,14 +12015,6 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_get_1revokeable_1redeems
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    HTLCOutputInCommitment_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCOutputInCommitment_get_offered
@@ -9463,6 +12079,14 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1set_1payment_1hash
   (JNIEnv *, jclass, jlong, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HTLCOutputInCommitment_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HTLCOutputInCommitment_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HTLCOutputInCommitment_write
@@ -9511,14 +12135,6 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_build_1htlc_1transaction
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    ChannelTransactionParameters_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelTransactionParameters_get_holder_pubkeys
@@ -9609,18 +12225,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CounterpartyChannelTransactionParameters_free
- * Signature: (J)V
+ * Method:    ChannelTransactionParameters_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelTransactionParameters_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    CounterpartyChannelTransactionParameters_clone
- * Signature: (J)J
+ * Method:    CounterpartyChannelTransactionParameters_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -9663,6 +12279,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransaction
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1new
   (JNIEnv *, jclass, jlong, jshort);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    CounterpartyChannelTransactionParameters_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_CounterpartyChannelTransactionParameters_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelTransactionParameters_is_populated
@@ -9775,14 +12399,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectedChannelTransactionPar
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    HolderCommitmentTransaction_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HolderCommitmentTransaction_get_counterparty_sig
@@ -9807,6 +12423,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1s
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1set_1counterparty_1htlc_1sigs
   (JNIEnv *, jclass, jlong, jobjectArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    HolderCommitmentTransaction_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    HolderCommitmentTransaction_write
@@ -9839,14 +12463,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_HolderCommitmentTransaction_1
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    BuiltCommitmentTransaction_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BuiltCommitmentTransaction_get_transaction
@@ -9887,6 +12503,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1se
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1new
   (JNIEnv *, jclass, jbyteArray, jbyteArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    BuiltCommitmentTransaction_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_BuiltCommitmentTransaction_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    BuiltCommitmentTransaction_write
@@ -10047,6 +12671,30 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_TrustedCommitmentTransaction_
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1commitment_1transaction_1number_1obscure_1factor
   (JNIEnv *, jclass, jbyteArray, jbyteArray, jboolean);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InitFeatures_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1clone
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelFeatures_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    InitFeatures_free
@@ -10073,18 +12721,106 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1free
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RouteHop_free
- * Signature: (J)V
+ * Method:    InitFeatures_empty
+ * Signature: ()J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InitFeatures_1empty
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_known
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InitFeatures_1known
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_empty
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1empty
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_known
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1known
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelFeatures_empty
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1empty
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelFeatures_known
+ * Signature: ()J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1known
+  (JNIEnv *, jclass);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_InitFeatures_1write
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RouteHop_clone
- * Signature: (J)J
+ * Method:    NodeFeatures_write
+ * Signature: (J)[B
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1clone
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelFeatures_write
+ * Signature: (J)[B
+ */
+JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1write
+  (JNIEnv *, jclass, jlong);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    InitFeatures_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_InitFeatures_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeFeatures_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeFeatures_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelFeatures_read
+ * Signature: ([B)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelFeatures_1read
+  (JNIEnv *, jclass, jbyteArray);
+
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RouteHop_free
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHop_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -10193,18 +12929,18 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1new
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Route_free
- * Signature: (J)V
+ * Method:    RouteHop_clone
+ * Signature: (J)J
  */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHop_1clone
   (JNIEnv *, jclass, jlong);
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    Route_clone
- * Signature: (J)J
+ * Method:    Route_free
+ * Signature: (J)V
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1clone
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1free
   (JNIEnv *, jclass, jlong);
 
 /*
@@ -10223,6 +12959,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_Route_1set_1paths
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1new
   (JNIEnv *, jclass, jobjectArray);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    Route_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    Route_write
@@ -10247,14 +12991,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_Route_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    RouteHint_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RouteHint_get_src_node_id
@@ -10321,28 +13057,12 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1cltv_1expiry_1
 
 /*
  * Class:     org_ldk_impl_bindings
- * Method:    RouteHint_get_htlc_minimum_msat
+ * Method:    RouteHint_clone
  * Signature: (J)J
  */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1get_1htlc_1minimum_1msat
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1clone
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    RouteHint_set_htlc_minimum_msat
- * Signature: (JJ)V
- */
-JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RouteHint_1set_1htlc_1minimum_1msat
-  (JNIEnv *, jclass, jlong, jlong);
-
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    RouteHint_new
- * Signature: ([BJJSJ)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RouteHint_1new
-  (JNIEnv *, jclass, jbyteArray, jlong, jlong, jshort, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    get_route
@@ -10359,6 +13079,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_get_1route
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1free
   (JNIEnv *, jclass, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NetworkGraph_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetworkGraph_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    LockedNetworkGraph_free
@@ -10391,6 +13119,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1new
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1from_1net_1graph
   (JNIEnv *, jclass, jlong, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NetGraphMsgHandler_add_chain_access
+ * Signature: (JJ)V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1add_1chain_1access
+  (JNIEnv *, jclass, jlong, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NetGraphMsgHandler_read_locked_graph
@@ -10431,14 +13167,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NetGraphMsgHandler_1as_1Messa
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    DirectionalChannelInfo_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DirectionalChannelInfo_get_last_update
@@ -10535,6 +13263,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1get_1
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1set_1last_1update_1message
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    DirectionalChannelInfo_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_DirectionalChannelInfo_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    DirectionalChannelInfo_write
@@ -10655,6 +13391,14 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1get_1announcemen
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1set_1announcement_1message
   (JNIEnv *, jclass, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    ChannelInfo_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    ChannelInfo_write
@@ -10679,14 +13423,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_ChannelInfo_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    RoutingFees_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RoutingFees_get_base_msat
@@ -10727,6 +13463,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_RoutingFees_1set_1proportional
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1new
   (JNIEnv *, jclass, jint, jint);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    RoutingFees_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_RoutingFees_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    RoutingFees_read
@@ -10751,14 +13495,6 @@ JNIEXPORT jbyteArray JNICALL Java_org_ldk_impl_bindings_RoutingFees_1write
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    NodeAnnouncementInfo_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeAnnouncementInfo_get_features
@@ -10855,6 +13591,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1set_1ann
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1new
   (JNIEnv *, jclass, jlong, jint, jbyteArray, jbyteArray, jlongArray, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeAnnouncementInfo_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeAnnouncementInfo_write
@@ -10879,14 +13623,6 @@ JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeAnnouncementInfo_1read
 JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1free
   (JNIEnv *, jclass, jlong);
 
-/*
- * Class:     org_ldk_impl_bindings
- * Method:    NodeInfo_clone
- * Signature: (J)J
- */
-JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone
-  (JNIEnv *, jclass, jlong);
-
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeInfo_set_channels
@@ -10935,6 +13671,14 @@ JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_NodeInfo_1set_1announcement_1i
 JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1new
   (JNIEnv *, jclass, jlongArray, jlong, jlong);
 
+/*
+ * Class:     org_ldk_impl_bindings
+ * Method:    NodeInfo_clone
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_org_ldk_impl_bindings_NodeInfo_1clone
+  (JNIEnv *, jclass, jlong);
+
 /*
  * Class:     org_ldk_impl_bindings
  * Method:    NodeInfo_write
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKMonitorEvent.h b/src/main/jni/org_ldk_impl_bindings_LDKMonitorEvent.h
new file mode 100644 (file)
index 0000000..2b898a0
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKMonitorEvent */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKMonitorEvent
+#define _Included_org_ldk_impl_bindings_LDKMonitorEvent
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKMonitorEvent
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKMonitorEvent_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/main/jni/org_ldk_impl_bindings_LDKPaymentSendFailure.h b/src/main/jni/org_ldk_impl_bindings_LDKPaymentSendFailure.h
new file mode 100644 (file)
index 0000000..3bffa6a
--- /dev/null
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class org_ldk_impl_bindings_LDKPaymentSendFailure */
+
+#ifndef _Included_org_ldk_impl_bindings_LDKPaymentSendFailure
+#define _Included_org_ldk_impl_bindings_LDKPaymentSendFailure
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     org_ldk_impl_bindings_LDKPaymentSendFailure
+ * Method:    init
+ * Signature: ()V
+ */
+JNIEXPORT void JNICALL Java_org_ldk_impl_bindings_00024LDKPaymentSendFailure_init
+  (JNIEnv *, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
index 807b33074b138b8e47adbe099615c2d5c9b7f6c6..cb79ff664310b7e934d88e4b63ee203129903fa8 100644 (file)
@@ -42,9 +42,9 @@ class HumanObjectPeerTestInstance {
                 @Override public byte[] get_shutdown_pubkey() { return underlying_if.get_shutdown_pubkey(); }
 
                 @Override
-                public ChannelKeys get_channel_keys(boolean inbound, long channel_value_satoshis) {
-                    ChannelKeys underlying_ck = underlying_if.get_channel_keys(inbound, channel_value_satoshis);
-                    ChannelKeys.ChannelKeysInterface cki = new ChannelKeys.ChannelKeysInterface() {
+                public Sign get_channel_signer(boolean inbound, long channel_value_satoshis) {
+                    Sign underlying_ck = underlying_if.get_channel_signer(inbound, channel_value_satoshis);
+                    Sign.SignInterface si = new Sign.SignInterface() {
                         @Override
                         public byte[] get_per_commitment_point(long idx) {
                             return underlying_ck.get_per_commitment_point(idx);
@@ -56,8 +56,8 @@ class HumanObjectPeerTestInstance {
                         }
 
                         @Override
-                        public TwoTuple<Long, Long> key_derivation_params() {
-                            return new TwoTuple<Long, Long>((long)0, (long)1);
+                        public byte[] channel_keys_id() {
+                            return new byte[32];
                         }
 
                         @Override
@@ -100,8 +100,8 @@ class HumanObjectPeerTestInstance {
                             return underlying_ck.write();
                         }
                     };
-                    ChannelKeys resp = ChannelKeys.new_impl(cki, underlying_ck.get_pubkeys());
-                    must_free_objs.add(new WeakReference<>(cki));
+                    Sign resp = Sign.new_impl(si, underlying_ck.get_pubkeys());
+                    must_free_objs.add(new WeakReference<>(si));
                     must_free_objs.add(new WeakReference<>(resp));
                     must_free_objs.add(new WeakReference<>(underlying_ck));
                     return resp;
@@ -113,7 +113,7 @@ class HumanObjectPeerTestInstance {
                 }
 
                 @Override
-                public Result_ChanKeySignerDecodeErrorZ read_chan_signer(byte[] reader) {
+                public Result_SignDecodeErrorZ read_chan_signer(byte[] reader) {
                     return underlying_if.read_chan_signer(reader);
                 }
             });
@@ -228,7 +228,7 @@ class HumanObjectPeerTestInstance {
             for (byte i = 0; i < 32; i++) {
                 key_seed[i] = (byte) (i ^ seed);
             }
-            KeysManager keys = KeysManager.constructor_new(key_seed, LDKNetwork.LDKNetwork_Bitcoin, System.currentTimeMillis() / 1000, (int) (System.currentTimeMillis() * 1000));
+            KeysManager keys = KeysManager.constructor_new(key_seed, System.currentTimeMillis() / 1000, (int) (System.currentTimeMillis() * 1000));
             if (use_km_wrapper) {
                 this.keys_interface = manual_keysif(keys.as_KeysInterface());
             } else {
@@ -249,7 +249,7 @@ class HumanObjectPeerTestInstance {
         }
         Peer(byte seed) {
             this(null, seed);
-            this.chan_manager = ChannelManager.constructor_new(LDKNetwork.LDKNetwork_Bitcoin, FeeEstimator.new_impl(confirmation_target -> 0), chain_watch, tx_broadcaster, logger, this.keys_interface, UserConfig.constructor_default(), 1);
+            this.chan_manager = ChannelManager.constructor_new(FeeEstimator.new_impl(confirmation_target -> 0), chain_watch, tx_broadcaster, logger, this.keys_interface, UserConfig.constructor_default(), LDKNetwork.LDKNetwork_Bitcoin, new byte[32], 1);
             this.node_id = chan_manager.get_our_node_id();
             this.chan_manager_events = chan_manager.as_EventsProvider();
 
@@ -333,6 +333,20 @@ class HumanObjectPeerTestInstance {
             return null;
         }
 
+        Event[] get_monitor_events() {
+            if (chain_monitor != null) {
+                return chain_monitor.as_EventsProvider().get_and_clear_pending_events();
+            } else {
+                synchronized (monitors) {
+                    assert monitors.size() == 1;
+                    for (ChannelMonitor mon : monitors.values()) {
+                        return mon.get_and_clear_pending_events();
+                    }
+                    return null;
+                }
+            }
+        }
+
         Route get_route(byte[] dest_node, ChannelDetails[] our_chans) {
             try (LockedNetworkGraph netgraph = this.router.read_locked_graph()) {
                 NetworkGraph graph = netgraph.graph();
@@ -517,6 +531,18 @@ class HumanObjectPeerTestInstance {
         assert payment_res instanceof Result_NonePaymentSendFailureZ.Result_NonePaymentSendFailureZ_OK;
         wait_events_processed(peer1, peer2);
 
+        RouteHop[][] hops = new RouteHop[1][1];
+        byte[] hop_pubkey = new byte[33];
+        hop_pubkey[0] = 3;
+        hop_pubkey[1] = 42;
+        hops[0][0] = RouteHop.constructor_new(hop_pubkey, NodeFeatures.constructor_known(), 42, ChannelFeatures.constructor_known(), 100, 0);
+        Route r2 = Route.constructor_new(hops);
+        payment_res = peer1.chan_manager.send_payment(r2, payment_hash, new byte[32]);
+        assert payment_res instanceof Result_NonePaymentSendFailureZ.Result_NonePaymentSendFailureZ_Err;
+
+        assert peer1.get_monitor_events().length == 0;
+        assert peer2.get_monitor_events().length == 0;
+
         if (reload_peers) {
             if (use_nio_peer_handler) {
                 peer1.nio_peer_handler.interrupt();
@@ -617,6 +643,9 @@ class HumanObjectPeerTestInstance {
             state.peer1.nio_peer_handler.interrupt();
             state.peer2.nio_peer_handler.interrupt();
         }
+
+        assert state.peer1.get_monitor_events().length == 0;
+        assert state.peer2.get_monitor_events().length == 0;
     }
 
     java.util.LinkedList<WeakReference<Object>> must_free_objs = new java.util.LinkedList();
index af6b1f818dd47f2fb049a6f6a8468ddba0f354c9..c1d6a5e3d12c51cf5c068e8a694b99316fb7ef38 100644 (file)
@@ -37,7 +37,7 @@ public class ManualMsgHandlingPeerTest {
             }
 
             @Override
-            public void handle_shutdown(byte[] their_node_id, long msg) {
+            public void handle_shutdown(byte[] their_node_id, long their_features, long msg) {
 
             }
 
index be652d2be19d6e1768b3382a597f99694ce72f41..bfb85754fd45330b9b84d535cae1fec9d2281cbf 100644 (file)
@@ -90,10 +90,11 @@ public class PeerTest {
 
             byte[] key_seed = new byte[32];
             for (byte i = 0; i < 32; i++) { key_seed[i] = (byte) (i ^ seed); }
-            this.keys = bindings.KeysManager_new(key_seed, LDKNetwork.LDKNetwork_Bitcoin, System.currentTimeMillis() / 1000, (int)(System.currentTimeMillis() * 1000) & 0xffffffff);
+            this.keys = bindings.KeysManager_new(key_seed, System.currentTimeMillis() / 1000, (int)(System.currentTimeMillis() * 1000) & 0xffffffff);
             this.keys_interface = bindings.KeysManager_as_KeysInterface(keys);
             this.config = bindings.UserConfig_default();
-            this.chan_manager = bindings.ChannelManager_new(LDKNetwork.LDKNetwork_Bitcoin, fee_estimator, chain_monitor, tx_broadcaster, logger, keys_interface, config, 1);
+            long params = bindings.ChainParameters_new(LDKNetwork.LDKNetwork_Bitcoin, new byte[32], 1);
+            this.chan_manager = bindings.ChannelManager_new(fee_estimator, chain_monitor, tx_broadcaster, logger, keys_interface, config, params);
             this.node_id = bindings.ChannelManager_get_our_node_id(chan_manager);
             this.chan_manager_events = bindings.ChannelManager_as_EventsProvider(chan_manager);
 
index 5430855529668bc9bb1eb431da6897be00dded4d..6a6178c5589805e0271bc9b38354f173ef2f3693 100644 (file)
@@ -127,6 +127,7 @@ static inline LDKNetwork LDKNetwork_from_js(int32_t ord) {
                case 0: return LDKNetwork_Bitcoin;
                case 1: return LDKNetwork_Testnet;
                case 2: return LDKNetwork_Regtest;
+               case 3: return LDKNetwork_Signet;
        }
        abort();
 }
@@ -135,6 +136,7 @@ static inline int32_t LDKNetwork_to_js(LDKNetwork val) {
                case LDKNetwork_Bitcoin: return 0;
                case LDKNetwork_Testnet: return 1;
                case LDKNetwork_Regtest: return 2;
+               case LDKNetwork_Signet: return 3;
                default: abort();
        }
 }
@@ -147,8 +149,8 @@ static inline LDKSecp256k1Error LDKSecp256k1Error_from_js(int32_t ord) {
                case 4: return LDKSecp256k1Error_InvalidSecretKey;
                case 5: return LDKSecp256k1Error_InvalidRecoveryId;
                case 6: return LDKSecp256k1Error_InvalidTweak;
-               case 7: return LDKSecp256k1Error_NotEnoughMemory;
-               case 8: return LDKSecp256k1Error_CallbackPanicked;
+               case 7: return LDKSecp256k1Error_TweakCheckFailed;
+               case 8: return LDKSecp256k1Error_NotEnoughMemory;
        }
        abort();
 }
@@ -161,8 +163,8 @@ static inline int32_t LDKSecp256k1Error_to_js(LDKSecp256k1Error val) {
                case LDKSecp256k1Error_InvalidSecretKey: return 4;
                case LDKSecp256k1Error_InvalidRecoveryId: return 5;
                case LDKSecp256k1Error_InvalidTweak: return 6;
-               case LDKSecp256k1Error_NotEnoughMemory: return 7;
-               case LDKSecp256k1Error_CallbackPanicked: return 8;
+               case LDKSecp256k1Error_TweakCheckFailed: return 7;
+               case LDKSecp256k1Error_NotEnoughMemory: return 8;
                default: abort();
        }
 }
@@ -185,79 +187,261 @@ static inline LDKCVec_u8Z CVec_u8Z_clone(const LDKCVec_u8Z *orig) {
        memcpy(ret.data, orig->data, sizeof(int8_t) * ret.datalen);
        return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u64u64Z_new(int64_t a, int64_t b) {
-       LDKC2Tuple_u64u64Z* ret = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       ret->a = a;
-       ret->b = b;
-       return (long)ret;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeyErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_SecretKeyErrorZ*)arg)->result_ok;
 }
-int64_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u64u64Z_get_a(uint32_t ptr) {
-       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
-       return tuple->a;
+int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeyErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_SecretKeyErrorZ *val = (LDKCResult_SecretKeyErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       int8_tArray res_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(res_arr + 4), (*val->contents.result).bytes, 32);
+       return res_arr;
 }
-int64_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u64u64Z_get_b(uint32_t ptr) {
-       LDKC2Tuple_u64u64Z *tuple = (LDKC2Tuple_u64u64Z*)(ptr & ~1);
-       return tuple->b;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeyErrorZ_get_err(uint32_t arg) {
+       LDKCResult_SecretKeyErrorZ *val = (LDKCResult_SecretKeyErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
+       return err_conv;
 }
-uint32_t __attribute__((visibility("default"))) TS_LDKSpendableOutputDescriptor_ref_from_ptr(uint32_t ptr) {
-       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
-       switch(obj->tag) {
-               case LDKSpendableOutputDescriptor_StaticOutput: {
-                       LDKOutPoint outpoint_var = obj->static_output.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       long output_ref = ((long)&obj->static_output.output) | 1;
-                       return 0 /* LDKSpendableOutputDescriptor - StaticOutput */; (void) outpoint_ref; (void) (long)output_ref;
-               }
-               case LDKSpendableOutputDescriptor_DynamicOutputP2WSH: {
-                       LDKOutPoint outpoint_var = obj->dynamic_output_p2wsh.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       int8_tArray per_commitment_point_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(per_commitment_point_arr + 4), obj->dynamic_output_p2wsh.per_commitment_point.compressed_form, 33);
-                       long output_ref = ((long)&obj->dynamic_output_p2wsh.output) | 1;
-                       long key_derivation_params_ref = (long)(&obj->dynamic_output_p2wsh.key_derivation_params) | 1;
-                       int8_tArray revocation_pubkey_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(revocation_pubkey_arr + 4), obj->dynamic_output_p2wsh.revocation_pubkey.compressed_form, 33);
-                       return 0 /* LDKSpendableOutputDescriptor - DynamicOutputP2WSH */; (void) outpoint_ref; (void) per_commitment_point_arr; (void) obj->dynamic_output_p2wsh.to_self_delay; (void) (long)output_ref; (void) key_derivation_params_ref; (void) revocation_pubkey_arr;
-               }
-               case LDKSpendableOutputDescriptor_StaticOutputCounterpartyPayment: {
-                       LDKOutPoint outpoint_var = obj->static_output_counterparty_payment.outpoint;
-                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long outpoint_ref = (long)outpoint_var.inner & ~1;
-                       long output_ref = ((long)&obj->static_output_counterparty_payment.output) | 1;
-                       long key_derivation_params_ref = (long)(&obj->static_output_counterparty_payment.key_derivation_params) | 1;
-                       return 0 /* LDKSpendableOutputDescriptor - StaticOutputCounterpartyPayment */; (void) outpoint_ref; (void) (long)output_ref; (void) key_derivation_params_ref;
-               }
-               default: abort();
-       }
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeyErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_PublicKeyErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_SpendableOutputDescriptorZ_new(uint32_tArray elems) {
-       LDKCVec_SpendableOutputDescriptorZ *ret = MALLOC(sizeof(LDKCVec_SpendableOutputDescriptorZ), "LDKCVec_SpendableOutputDescriptorZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * ret->datalen, "LDKCVec_SpendableOutputDescriptorZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKSpendableOutputDescriptor arr_elem_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-       }
-       return (long)ret;
+int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeyErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_PublicKeyErrorZ *val = (LDKCResult_PublicKeyErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       int8_tArray res_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(res_arr + 4), (*val->contents.result).compressed_form, 33);
+       return res_arr;
 }
-static inline LDKCVec_SpendableOutputDescriptorZ CVec_SpendableOutputDescriptorZ_clone(const LDKCVec_SpendableOutputDescriptorZ *orig) {
-       LDKCVec_SpendableOutputDescriptorZ ret = { .data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * orig->datalen, "LDKCVec_SpendableOutputDescriptorZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = SpendableOutputDescriptor_clone(&orig->data[i]);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeyErrorZ_get_err(uint32_t arg) {
+       LDKCResult_PublicKeyErrorZ *val = (LDKCResult_PublicKeyErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
+       return err_conv;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_TxCreationKeysDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_TxCreationKeysDecodeErrorZ *val = (LDKCResult_TxCreationKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTxCreationKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_TxCreationKeysDecodeErrorZ *val = (LDKCResult_TxCreationKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelPublicKeysDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ *val = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelPublicKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ *val = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_TxCreationKeysErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_TxCreationKeysErrorZ *val = (LDKCResult_TxCreationKeysErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTxCreationKeys res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysErrorZ_get_err(uint32_t arg) {
+       LDKCResult_TxCreationKeysErrorZ *val = (LDKCResult_TxCreationKeysErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
+       return err_conv;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *val = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHTLCOutputInCommitment res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *val = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCounterpartyChannelTransactionParameters res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelTransactionParametersDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelTransactionParameters res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ *val = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ *val = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKHolderCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ *val = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *val = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKBuiltCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *val = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CommitmentTransactionDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ *val = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ *val = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_TrustedCommitmentTransactionNoneZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(uint32_t arg) {
+       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKTrustedCommitmentTransaction res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+void  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(uint32_t arg) {
+       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CVec_SignatureZNoneZ*)arg)->result_ok;
+}
+ptrArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_get_ok(uint32_t arg) {
+       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKCVec_SignatureZ res_var = (*val->contents.result);
+       ptrArray res_arr = init_arr(res_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
+       int8_tArray *res_arr_ptr = (int8_tArray*)(res_arr + 4);
+       for (size_t m = 0; m < res_var.datalen; m++) {
+               int8_tArray res_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+               memcpy((uint8_t*)(res_conv_12_arr + 4), res_var.data[m].compact_form, 64);
+               res_arr_ptr[m] = res_conv_12_arr;
        }
-       return ret;
+       return res_arr;
+}
+void  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_get_err(uint32_t arg) {
+       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
 }
 uint32_t __attribute__((visibility("default"))) TS_LDKErrorAction_ref_from_ptr(uint32_t ptr) {
        LDKErrorAction *obj = (LDKErrorAction*)ptr;
@@ -485,779 +669,688 @@ static inline LDKCVec_MessageSendEventZ CVec_MessageSendEventZ_clone(const LDKCV
        }
        return ret;
 }
-uint32_t __attribute__((visibility("default"))) TS_LDKEvent_ref_from_ptr(uint32_t ptr) {
-       LDKEvent *obj = (LDKEvent*)ptr;
-       switch(obj->tag) {
-               case LDKEvent_FundingGenerationReady: {
-                       int8_tArray temporary_channel_id_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(temporary_channel_id_arr + 4), obj->funding_generation_ready.temporary_channel_id.data, 32);
-                       LDKCVec_u8Z output_script_var = obj->funding_generation_ready.output_script;
-                       int8_tArray output_script_arr = init_arr(output_script_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(output_script_arr + 4), output_script_var.data, output_script_var.datalen);
-                       return 0 /* LDKEvent - FundingGenerationReady */; (void) temporary_channel_id_arr; (void) obj->funding_generation_ready.channel_value_satoshis; (void) output_script_arr; (void) obj->funding_generation_ready.user_channel_id;
-               }
-               case LDKEvent_FundingBroadcastSafe: {
-                       LDKOutPoint funding_txo_var = obj->funding_broadcast_safe.funding_txo;
-                       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-                       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-                       long funding_txo_ref = (long)funding_txo_var.inner & ~1;
-                       return 0 /* LDKEvent - FundingBroadcastSafe */; (void) funding_txo_ref; (void) obj->funding_broadcast_safe.user_channel_id;
-               }
-               case LDKEvent_PaymentReceived: {
-                       int8_tArray payment_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(payment_hash_arr + 4), obj->payment_received.payment_hash.data, 32);
-                       int8_tArray payment_secret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(payment_secret_arr + 4), obj->payment_received.payment_secret.data, 32);
-                       return 0 /* LDKEvent - PaymentReceived */; (void) payment_hash_arr; (void) payment_secret_arr; (void) obj->payment_received.amt;
-               }
-               case LDKEvent_PaymentSent: {
-                       int8_tArray payment_preimage_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(payment_preimage_arr + 4), obj->payment_sent.payment_preimage.data, 32);
-                       return 0 /* LDKEvent - PaymentSent */; (void) payment_preimage_arr;
-               }
-               case LDKEvent_PaymentFailed: {
-                       int8_tArray payment_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(payment_hash_arr + 4), obj->payment_failed.payment_hash.data, 32);
-                       return 0 /* LDKEvent - PaymentFailed */; (void) payment_hash_arr; (void) obj->payment_failed.rejected_by_dest;
-               }
-               case LDKEvent_PendingHTLCsForwardable: {
-                       return 0 /* LDKEvent - PendingHTLCsForwardable */; (void) obj->pending_htl_cs_forwardable.time_forwardable;
-               }
-               case LDKEvent_SpendableOutputs: {
-                       LDKCVec_SpendableOutputDescriptorZ outputs_var = obj->spendable_outputs.outputs;
-                       uint32_tArray outputs_arr = init_arr(outputs_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-                       uint32_t *outputs_arr_ptr = (uint32_t*)(outputs_arr + 4);
-                       for (size_t b = 0; b < outputs_var.datalen; b++) {
-                               long arr_conv_27_ref = ((long)&outputs_var.data[b]) | 1;
-                               outputs_arr_ptr[b] = arr_conv_27_ref;
-                       }
-                       return 0 /* LDKEvent - SpendableOutputs */; (void) outputs_arr;
-               }
-               default: abort();
-       }
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_boolLightningErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_EventZ_new(uint32_tArray elems) {
-       LDKCVec_EventZ *ret = MALLOC(sizeof(LDKCVec_EventZ), "LDKCVec_EventZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKEvent) * ret->datalen, "LDKCVec_EventZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKEvent arr_elem_conv = *(LDKEvent*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-       }
-       return (long)ret;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
 }
-static inline LDKCVec_EventZ CVec_EventZ_clone(const LDKCVec_EventZ *orig) {
-       LDKCVec_EventZ ret = { .data = MALLOC(sizeof(LDKEvent) * orig->datalen, "LDKCVec_EventZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = Event_clone(&orig->data[i]);
-       }
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_get_err(uint32_t arg) {
+       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKLightningError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_new(int64_t a, int8_tArray b) {
-       LDKC2Tuple_usizeTransactionZ* ret = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
-       ret->a = a;
-       LDKTransaction b_ref;
-       b_ref.datalen = *((uint32_t*)b);
-       b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
-       memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
-       b_ref.data_is_owned = false;
-       ret->b = b_ref;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = ChannelAnnouncement_clone(&a_conv);
+       ret->a = a_conv;
+       LDKChannelUpdate b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelUpdate_clone(&b_conv);
+       ret->b = b_conv;
+       LDKChannelUpdate c_conv;
+       c_conv.inner = (void*)(c & (~1));
+       c_conv.is_owned = (c & 1) || (c == 0);
+       c_conv = ChannelUpdate_clone(&c_conv);
+       ret->c = c_conv;
        return (long)ret;
 }
-int64_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
-       return tuple->a;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(uint32_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelAnnouncement a_var = tuple->a;
+       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long a_ref = (long)a_var.inner & ~1;
+       return a_ref;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
-       LDKTransaction b_var = tuple->b;
-       int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
-       return b_arr;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(uint32_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelUpdate b_var = tuple->b;
+       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long b_ref = (long)b_var.inner & ~1;
+       return b_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_usizeTransactionZZ_new(uint32_tArray elems) {
-       LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(uint32_t ptr) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
+       LDKChannelUpdate c_var = tuple->c;
+       CHECK((((long)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long c_ref = (long)c_var.inner & ~1;
+       return c_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(uint32_tArray elems) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ) * ret->datalen, "LDKCVec_C2Tuple_usizeTransactionZZ Data");
+               ret->data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * ret->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKC2Tuple_usizeTransactionZ arr_elem_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_elem) & ~1);
+                       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_elem_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_elem) & ~1);
                        FREE((void*)arr_elem);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NoneChannelMonitorUpdateErrZ*)arg)->result_ok;
-}
-void  __attribute__((visibility("default"))) TS_LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(uint32_t arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(uint32_t arg) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       uint32_t err_conv = LDKChannelMonitorUpdateErr_to_js((*val->contents.err));
-       return err_conv;
+static inline LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_clone(const LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *orig) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret = { .data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * orig->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(&orig->data[i]);
+       }
+       return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_MonitorEventZ_new(uint32_tArray elems) {
-       LDKCVec_MonitorEventZ *ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_NodeAnnouncementZ_new(uint32_tArray elems) {
+       LDKCVec_NodeAnnouncementZ *ret = MALLOC(sizeof(LDKCVec_NodeAnnouncementZ), "LDKCVec_NodeAnnouncementZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKMonitorEvent) * ret->datalen, "LDKCVec_MonitorEventZ Data");
+               ret->data = MALLOC(sizeof(LDKNodeAnnouncement) * ret->datalen, "LDKCVec_NodeAnnouncementZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKMonitorEvent arr_elem_conv;
+                       LDKNodeAnnouncement arr_elem_conv;
                        arr_elem_conv.inner = (void*)(arr_elem & (~1));
                        arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = MonitorEvent_clone(&arr_elem_conv);
+                       arr_elem_conv = NodeAnnouncement_clone(&arr_elem_conv);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_MonitorEventZ *orig) {
-       LDKCVec_MonitorEventZ ret = { .data = MALLOC(sizeof(LDKMonitorEvent) * orig->datalen, "LDKCVec_MonitorEventZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_NodeAnnouncementZ CVec_NodeAnnouncementZ_clone(const LDKCVec_NodeAnnouncementZ *orig) {
+       LDKCVec_NodeAnnouncementZ ret = { .data = MALLOC(sizeof(LDKNodeAnnouncement) * orig->datalen, "LDKCVec_NodeAnnouncementZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = MonitorEvent_clone(&orig->data[i]);
+               ret.data[i] = NodeAnnouncement_clone(&orig->data[i]);
        }
        return ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NoneLightningErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ *val = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(arg & ~1);
+void  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKChannelMonitorUpdate res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+       return *val->contents.result;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_ChannelMonitorUpdateDecodeErrorZ *val = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
+       LDKLightningError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneMonitorUpdateErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NoneMonitorUpdateErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg)->result_ok;
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_NoneMonitorUpdateErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NoneMonitorUpdateErrorZ *val = (LDKCResult_NoneMonitorUpdateErrorZ*)(arg & ~1);
+int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       return *val->contents.result;
+       LDKCVec_u8Z res_var = (*val->contents.result);
+       int8_tArray res_arr = init_arr(res_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(res_arr + 4), res_var.data, res_var.datalen);
+       return res_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneMonitorUpdateErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NoneMonitorUpdateErrorZ *val = (LDKCResult_NoneMonitorUpdateErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(uint32_t arg) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKMonitorUpdateError err_var = (*val->contents.err);
+       LDKPeerHandleError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_new(uint32_t a, int8_tArray b) {
-       LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
-       LDKOutPoint a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = OutPoint_clone(&a_conv);
-       ret->a = a_conv;
-       LDKCVec_u8Z b_ref;
-       b_ref.datalen = *((uint32_t*)b);
-       b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
-       memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
-       ret->b = b_ref;
-       return (long)ret;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NonePeerHandleErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKOutPoint a_var = tuple->a;
-       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long a_ref = (long)a_var.inner & ~1;
-       return a_ref;
+void  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
-       LDKCVec_u8Z b_var = tuple->b;
-       int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
-       return b_arr;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKPeerHandleError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_new(int32_t a, uint32_t b) {
-       LDKC2Tuple_u32TxOutZ* ret = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       ret->a = a;
-       LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
-       FREE((void*)b);
-       ret->b = b_conv;
-       return (long)ret;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_boolPeerHandleErrorZ*)arg)->result_ok;
 }
-int32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
-       return tuple->a;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
-       long b_ref = ((long)&tuple->b) | 1;
-       return (long)b_ref;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_get_err(uint32_t arg) {
+       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKPeerHandleError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_u32TxOutZZ_new(uint32_tArray elems) {
-       LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ) * ret->datalen, "LDKCVec_C2Tuple_u32TxOutZZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKC2Tuple_u32TxOutZ arr_elem_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
-       }
-       return (long)ret;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_InitFeaturesDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_InitFeaturesDecodeErrorZ*)arg)->result_ok;
 }
-static inline LDKCVec_C2Tuple_u32TxOutZZ CVec_C2Tuple_u32TxOutZZ_clone(const LDKCVec_C2Tuple_u32TxOutZZ *orig) {
-       LDKCVec_C2Tuple_u32TxOutZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ) * orig->datalen, "LDKCVec_C2Tuple_u32TxOutZZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = C2Tuple_u32TxOutZ_clone(&orig->data[i]);
-       }
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitFeaturesDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_InitFeaturesDecodeErrorZ *val = (LDKCResult_InitFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKInitFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(int8_tArray a, uint32_tArray b) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       LDKThirtyTwoBytes a_ref;
-       CHECK(*((uint32_t*)a) == 32);
-       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
-       ret->a = a_ref;
-       LDKCVec_C2Tuple_u32TxOutZZ b_constr;
-       b_constr.datalen = *((uint32_t*)b);
-       if (b_constr.datalen > 0)
-               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
-       else
-               b_constr.data = NULL;
-       uint32_t* b_vals = (uint32_t*)(b + 4);
-       for (size_t z = 0; z < b_constr.datalen; z++) {
-               uint32_t arr_conv_25 = b_vals[z];
-               LDKC2Tuple_u32TxOutZ arr_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)arr_conv_25) & ~1);
-               FREE((void*)arr_conv_25);
-               b_constr.data[z] = arr_conv_25_conv;
-       }
-       ret->b = b_constr;
-       return (long)ret;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitFeaturesDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_InitFeaturesDecodeErrorZ *val = (LDKCResult_InitFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
-       int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
-       return a_arr;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NodeFeaturesDecodeErrorZ*)arg)->result_ok;
 }
-uint32_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
-       LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
-       uint32_tArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *b_arr_ptr = (uint32_t*)(b_arr + 4);
-       for (size_t z = 0; z < b_var.datalen; z++) {
-               long arr_conv_25_ref = (long)(&b_var.data[z]) | 1;
-               b_arr_ptr[z] = arr_conv_25_ref;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NodeFeaturesDecodeErrorZ *val = (LDKCResult_NodeFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeFeaturesDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NodeFeaturesDecodeErrorZ *val = (LDKCResult_NodeFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelFeaturesDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelFeaturesDecodeErrorZ *val = (LDKCResult_ChannelFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelFeatures res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelFeaturesDecodeErrorZ *val = (LDKCResult_ChannelFeaturesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelConfigDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelConfigDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelConfigDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelConfigDecodeErrorZ *val = (LDKCResult_ChannelConfigDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelConfig res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelConfigDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelConfigDecodeErrorZ *val = (LDKCResult_ChannelConfigDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_DirectionalChannelInfoDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ *val = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKDirectionalChannelInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ *val = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelInfoDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelInfoDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelInfoDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelInfoDecodeErrorZ *val = (LDKCResult_ChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelInfoDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelInfoDecodeErrorZ *val = (LDKCResult_ChannelInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_RoutingFeesDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKRoutingFees res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+uint32_t __attribute__((visibility("default"))) TS_LDKNetAddress_ref_from_ptr(uint32_t ptr) {
+       LDKNetAddress *obj = (LDKNetAddress*)ptr;
+       switch(obj->tag) {
+               case LDKNetAddress_IPv4: {
+                       int8_tArray addr_arr = init_arr(4, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(addr_arr + 4), obj->i_pv4.addr.data, 4);
+                       return 0 /* LDKNetAddress - IPv4 */; (void) addr_arr; (void) obj->i_pv4.port;
+               }
+               case LDKNetAddress_IPv6: {
+                       int8_tArray addr_arr = init_arr(16, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(addr_arr + 4), obj->i_pv6.addr.data, 16);
+                       return 0 /* LDKNetAddress - IPv6 */; (void) addr_arr; (void) obj->i_pv6.port;
+               }
+               case LDKNetAddress_OnionV2: {
+                       int8_tArray addr_arr = init_arr(10, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(addr_arr + 4), obj->onion_v2.addr.data, 10);
+                       return 0 /* LDKNetAddress - OnionV2 */; (void) addr_arr; (void) obj->onion_v2.port;
+               }
+               case LDKNetAddress_OnionV3: {
+                       int8_tArray ed25519_pubkey_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(ed25519_pubkey_arr + 4), obj->onion_v3.ed25519_pubkey.data, 32);
+                       return 0 /* LDKNetAddress - OnionV3 */; (void) ed25519_pubkey_arr; (void) obj->onion_v3.checksum; (void) obj->onion_v3.version; (void) obj->onion_v3.port;
+               }
+               default: abort();
        }
-       return b_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(uint32_tArray elems) {
-       LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_NetAddressZ_new(uint32_tArray elems) {
+       LDKCVec_NetAddressZ *ret = MALLOC(sizeof(LDKCVec_NetAddressZ), "LDKCVec_NetAddressZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ) * ret->datalen, "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ Data");
+               ret->data = MALLOC(sizeof(LDKNetAddress) * ret->datalen, "LDKCVec_NetAddressZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ arr_elem_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)arr_elem) & ~1);
+                       LDKNetAddress arr_elem_conv = *(LDKNetAddress*)(((uint64_t)arr_elem) & ~1);
                        FREE((void*)arr_elem);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_new(int8_tArray a, ptrArray b) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ* ret = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
-       LDKSignature a_ref;
-       CHECK(*((uint32_t*)a) == 64);
-       memcpy(a_ref.compact_form, (uint8_t*)(a + 4), 64);
-       ret->a = a_ref;
-       LDKCVec_SignatureZ b_constr;
-       b_constr.datalen = *((uint32_t*)b);
-       if (b_constr.datalen > 0)
-               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
-       else
-               b_constr.data = NULL;
-       int8_tArray* b_vals = (int8_tArray*)(b + 4);
-       for (size_t m = 0; m < b_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = b_vals[m];
-               LDKSignature arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 64);
-               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
-               b_constr.data[m] = arr_conv_12_ref;
-       }
-       ret->b = b_constr;
-       return (long)ret;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       int8_tArray a_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(a_arr + 4), tuple->a.compact_form, 64);
-       return a_arr;
-}
-ptrArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
-       LDKCVec_SignatureZ b_var = tuple->b;
-       ptrArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
-       int8_tArray *b_arr_ptr = (int8_tArray*)(b_arr + 4);
-       for (size_t m = 0; m < b_var.datalen; m++) {
-               int8_tArray arr_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-               memcpy((uint8_t*)(arr_conv_12_arr + 4), b_var.data[m].compact_form, 64);
-               b_arr_ptr[m] = arr_conv_12_arr;
+static inline LDKCVec_NetAddressZ CVec_NetAddressZ_clone(const LDKCVec_NetAddressZ *orig) {
+       LDKCVec_NetAddressZ ret = { .data = MALLOC(sizeof(LDKNetAddress) * orig->datalen, "LDKCVec_NetAddressZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = NetAddress_clone(&orig->data[i]);
        }
-       return b_arr;
+       return ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(uint32_t arg) {
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       long res_ref = (long)(&(*val->contents.result)) | 1;
+       LDKNodeAnnouncementInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(uint32_t arg) {
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       return *val->contents.err;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SignatureNoneZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_SignatureNoneZ*)arg)->result_ok;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_u64Z_new(int64_tArray elems) {
+       LDKCVec_u64Z *ret = MALLOC(sizeof(LDKCVec_u64Z), "LDKCVec_u64Z");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(uint64_t) * ret->datalen, "LDKCVec_u64Z Data");
+               int64_t *java_elems = (int64_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       ret->data[i] = java_elems[i];
+               }
+       }
+       return (long)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_SignatureNoneZ_get_ok(uint32_t arg) {
-       LDKCResult_SignatureNoneZ *val = (LDKCResult_SignatureNoneZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       int8_tArray res_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(res_arr + 4), (*val->contents.result).compact_form, 64);
-       return res_arr;
+static inline LDKCVec_u64Z CVec_u64Z_clone(const LDKCVec_u64Z *orig) {
+       LDKCVec_u64Z ret = { .data = MALLOC(sizeof(int64_t) * orig->datalen, "LDKCVec_u64Z clone bytes"), .datalen = orig->datalen };
+       memcpy(ret.data, orig->data, sizeof(int64_t) * ret.datalen);
+       return ret;
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_SignatureNoneZ_get_err(uint32_t arg) {
-       LDKCResult_SignatureNoneZ *val = (LDKCResult_SignatureNoneZ*)(arg & ~1);
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NodeInfoDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeInfo res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       return *val->contents.err;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-typedef struct LDKChannelKeys_JCalls {
-       atomic_size_t refcnt;
-       uint32_t get_per_commitment_point_meth;
-       uint32_t release_commitment_secret_meth;
-       uint32_t key_derivation_params_meth;
-       uint32_t sign_counterparty_commitment_meth;
-       uint32_t sign_holder_commitment_and_htlcs_meth;
-       uint32_t sign_justice_transaction_meth;
-       uint32_t sign_counterparty_htlc_transaction_meth;
-       uint32_t sign_closing_transaction_meth;
-       uint32_t sign_channel_announcement_meth;
-       uint32_t ready_channel_meth;
-       uint32_t write_meth;
-} LDKChannelKeys_JCalls;
-static void LDKChannelKeys_JCalls_free(void* this_arg) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->get_per_commitment_point_meth);
-               js_free(j_calls->release_commitment_secret_meth);
-               js_free(j_calls->key_derivation_params_meth);
-               js_free(j_calls->sign_counterparty_commitment_meth);
-               js_free(j_calls->sign_holder_commitment_and_htlcs_meth);
-               js_free(j_calls->sign_justice_transaction_meth);
-               js_free(j_calls->sign_counterparty_htlc_transaction_meth);
-               js_free(j_calls->sign_closing_transaction_meth);
-               js_free(j_calls->sign_channel_announcement_meth);
-               js_free(j_calls->ready_channel_meth);
-               js_free(j_calls->write_meth);
-               FREE(j_calls);
-       }
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NetworkGraphDecodeErrorZ*)arg)->result_ok;
 }
-LDKPublicKey get_per_commitment_point_jcall(const void* this_arg, uint64_t idx) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       int8_tArray arg = js_invoke_function_1(j_calls->get_per_commitment_point_meth, idx);
-       LDKPublicKey arg_ref;
-       CHECK(*((uint32_t*)arg) == 33);
-       memcpy(arg_ref.compressed_form, (uint8_t*)(arg + 4), 33);
-       return arg_ref;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNetworkGraph res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-LDKThirtyTwoBytes release_commitment_secret_jcall(const void* this_arg, uint64_t idx) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       int8_tArray arg = js_invoke_function_1(j_calls->release_commitment_secret_meth, idx);
-       LDKThirtyTwoBytes arg_ref;
-       CHECK(*((uint32_t*)arg) == 32);
-       memcpy(arg_ref.data, (uint8_t*)(arg + 4), 32);
-       return arg_ref;
-}
-LDKC2Tuple_u64u64Z key_derivation_params_jcall(const void* this_arg) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       LDKC2Tuple_u64u64Z* ret = (LDKC2Tuple_u64u64Z*)js_invoke_function_0(j_calls->key_derivation_params_meth);
-       LDKC2Tuple_u64u64Z ret_conv = *(LDKC2Tuple_u64u64Z*)(((uint64_t)ret) & ~1);
-       ret_conv = C2Tuple_u64u64Z_clone((LDKC2Tuple_u64u64Z*)ret);
-       return ret_conv;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment_jcall(const void* this_arg, const LDKCommitmentTransaction * commitment_tx) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       LDKCommitmentTransaction commitment_tx_var = *commitment_tx;
-       commitment_tx_var = CommitmentTransaction_clone(commitment_tx);
-       CHECK((((long)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long commitment_tx_ref = (long)commitment_tx_var.inner;
-       if (commitment_tx_var.is_owned) {
-               commitment_tx_ref |= 1;
-       }
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)js_invoke_function_1(j_calls->sign_counterparty_commitment_meth, commitment_tx_ref);
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)ret);
-       return ret_conv;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_new(int64_t a, int8_tArray b) {
+       LDKC2Tuple_usizeTransactionZ* ret = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ), "LDKC2Tuple_usizeTransactionZ");
+       ret->a = a;
+       LDKTransaction b_ref;
+       b_ref.datalen = *((uint32_t*)b);
+       b_ref.data = MALLOC(b_ref.datalen, "LDKTransaction Bytes");
+       memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
+       b_ref.data_is_owned = false;
+       ret->b = b_ref;
+       return (long)ret;
 }
-LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs_jcall(const void* this_arg, const LDKHolderCommitmentTransaction * commitment_tx) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       LDKHolderCommitmentTransaction commitment_tx_var = *commitment_tx;
-       commitment_tx_var = HolderCommitmentTransaction_clone(commitment_tx);
-       CHECK((((long)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long commitment_tx_ref = (long)commitment_tx_var.inner;
-       if (commitment_tx_var.is_owned) {
-               commitment_tx_ref |= 1;
-       }
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)js_invoke_function_1(j_calls->sign_holder_commitment_and_htlcs_meth, commitment_tx_ref);
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)ret);
-       return ret_conv;
+int64_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_a(uint32_t ptr) {
+       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+       return tuple->a;
 }
-LDKCResult_SignatureNoneZ sign_justice_transaction_jcall(const void* this_arg, LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (* per_commitment_key)[32], const LDKHTLCOutputInCommitment * htlc) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       LDKTransaction justice_tx_var = justice_tx;
-       int8_tArray justice_tx_arr = init_arr(justice_tx_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(justice_tx_arr + 4), justice_tx_var.data, justice_tx_var.datalen);
-       Transaction_free(justice_tx_var);
-       int8_tArray per_commitment_key_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(per_commitment_key_arr + 4), *per_commitment_key, 32);
-       LDKHTLCOutputInCommitment htlc_var = *htlc;
-       htlc_var = HTLCOutputInCommitment_clone(htlc);
-       CHECK((((long)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long htlc_ref = (long)htlc_var.inner;
-       if (htlc_var.is_owned) {
-               htlc_ref |= 1;
-       }
-       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)js_invoke_function_5(j_calls->sign_justice_transaction_meth, justice_tx_arr, input, amount, per_commitment_key_arr, htlc_ref);
-       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
-       return ret_conv;
+int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_usizeTransactionZ_get_b(uint32_t ptr) {
+       LDKC2Tuple_usizeTransactionZ *tuple = (LDKC2Tuple_usizeTransactionZ*)(ptr & ~1);
+       LDKTransaction b_var = tuple->b;
+       int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
+       return b_arr;
 }
-LDKCResult_SignatureNoneZ sign_counterparty_htlc_transaction_jcall(const void* this_arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment * htlc) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       LDKTransaction htlc_tx_var = htlc_tx;
-       int8_tArray htlc_tx_arr = init_arr(htlc_tx_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(htlc_tx_arr + 4), htlc_tx_var.data, htlc_tx_var.datalen);
-       Transaction_free(htlc_tx_var);
-       int8_tArray per_commitment_point_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(per_commitment_point_arr + 4), per_commitment_point.compressed_form, 33);
-       LDKHTLCOutputInCommitment htlc_var = *htlc;
-       htlc_var = HTLCOutputInCommitment_clone(htlc);
-       CHECK((((long)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long htlc_ref = (long)htlc_var.inner;
-       if (htlc_var.is_owned) {
-               htlc_ref |= 1;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_usizeTransactionZZ_new(uint32_tArray elems) {
+       LDKCVec_C2Tuple_usizeTransactionZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_usizeTransactionZZ), "LDKCVec_C2Tuple_usizeTransactionZZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKC2Tuple_usizeTransactionZ) * ret->datalen, "LDKCVec_C2Tuple_usizeTransactionZZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKC2Tuple_usizeTransactionZ arr_elem_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
        }
-       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)js_invoke_function_5(j_calls->sign_counterparty_htlc_transaction_meth, htlc_tx_arr, input, amount, per_commitment_point_arr, htlc_ref);
-       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
-       return ret_conv;
+       return (long)ret;
 }
-LDKCResult_SignatureNoneZ sign_closing_transaction_jcall(const void* this_arg, LDKTransaction closing_tx) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       LDKTransaction closing_tx_var = closing_tx;
-       int8_tArray closing_tx_arr = init_arr(closing_tx_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(closing_tx_arr + 4), closing_tx_var.data, closing_tx_var.datalen);
-       Transaction_free(closing_tx_var);
-       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)js_invoke_function_1(j_calls->sign_closing_transaction_meth, closing_tx_arr);
-       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
-       return ret_conv;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NoneChannelMonitorUpdateErrZ*)arg)->result_ok;
 }
-LDKCResult_SignatureNoneZ sign_channel_announcement_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement * msg) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       LDKUnsignedChannelAnnouncement msg_var = *msg;
-       msg_var = UnsignedChannelAnnouncement_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+void  __attribute__((visibility("default"))) TS_LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(uint32_t arg) {
+       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(uint32_t arg) {
+       LDKCResult_NoneChannelMonitorUpdateErrZ *val = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       uint32_t err_conv = LDKChannelMonitorUpdateErr_to_js((*val->contents.err));
+       return err_conv;
+}
+uint32_t __attribute__((visibility("default"))) TS_LDKMonitorEvent_ref_from_ptr(uint32_t ptr) {
+       LDKMonitorEvent *obj = (LDKMonitorEvent*)ptr;
+       switch(obj->tag) {
+               case LDKMonitorEvent_HTLCEvent: {
+                       return 0 /* LDKMonitorEvent - HTLCEvent */;
+               }
+               case LDKMonitorEvent_CommitmentTxBroadcasted: {
+                       return 0 /* LDKMonitorEvent - CommitmentTxBroadcasted */;
+               }
+               default: abort();
        }
-       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)js_invoke_function_1(j_calls->sign_channel_announcement_meth, msg_ref);
-       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
-       return ret_conv;
 }
-void ready_channel_jcall(void* this_arg, const LDKChannelTransactionParameters * channel_parameters) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       LDKChannelTransactionParameters channel_parameters_var = *channel_parameters;
-       channel_parameters_var = ChannelTransactionParameters_clone(channel_parameters);
-       CHECK((((long)channel_parameters_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&channel_parameters_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long channel_parameters_ref = (long)channel_parameters_var.inner;
-       if (channel_parameters_var.is_owned) {
-               channel_parameters_ref |= 1;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_MonitorEventZ_new(uint32_tArray elems) {
+       LDKCVec_MonitorEventZ *ret = MALLOC(sizeof(LDKCVec_MonitorEventZ), "LDKCVec_MonitorEventZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKMonitorEvent) * ret->datalen, "LDKCVec_MonitorEventZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKMonitorEvent arr_elem_conv = *(LDKMonitorEvent*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
        }
-       js_invoke_function_1(j_calls->ready_channel_meth, channel_parameters_ref);
+       return (long)ret;
 }
-LDKCVec_u8Z write_jcall(const void* this_arg) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       int8_tArray arg = js_invoke_function_0(j_calls->write_meth);
-       LDKCVec_u8Z arg_ref;
-       arg_ref.datalen = *((uint32_t*)arg);
-       arg_ref.data = MALLOC(arg_ref.datalen, "LDKCVec_u8Z Bytes");
-       memcpy(arg_ref.data, (uint8_t*)(arg + 4), arg_ref.datalen);
-       return arg_ref;
-}
-static void* LDKChannelKeys_JCalls_clone(const void* this_arg) {
-       LDKChannelKeys_JCalls *j_calls = (LDKChannelKeys_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+static inline LDKCVec_MonitorEventZ CVec_MonitorEventZ_clone(const LDKCVec_MonitorEventZ *orig) {
+       LDKCVec_MonitorEventZ ret = { .data = MALLOC(sizeof(LDKMonitorEvent) * orig->datalen, "LDKCVec_MonitorEventZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = MonitorEvent_clone(&orig->data[i]);
+       }
+       return ret;
 }
-static inline LDKChannelKeys LDKChannelKeys_init (/*TODO: JS Object Reference */void* o, uint32_t pubkeys) {
-       LDKChannelKeys_JCalls *calls = MALLOC(sizeof(LDKChannelKeys_JCalls), "LDKChannelKeys_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
-
-       LDKChannelPublicKeys pubkeys_conv;
-       pubkeys_conv.inner = (void*)(pubkeys & (~1));
-       pubkeys_conv.is_owned = (pubkeys & 1) || (pubkeys == 0);
-       pubkeys_conv = ChannelPublicKeys_clone(&pubkeys_conv);
-
-       LDKChannelKeys ret = {
-               .this_arg = (void*) calls,
-               .get_per_commitment_point = get_per_commitment_point_jcall,
-               .release_commitment_secret = release_commitment_secret_jcall,
-               .key_derivation_params = key_derivation_params_jcall,
-               .sign_counterparty_commitment = sign_counterparty_commitment_jcall,
-               .sign_holder_commitment_and_htlcs = sign_holder_commitment_and_htlcs_jcall,
-               .sign_justice_transaction = sign_justice_transaction_jcall,
-               .sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_jcall,
-               .sign_closing_transaction = sign_closing_transaction_jcall,
-               .sign_channel_announcement = sign_channel_announcement_jcall,
-               .ready_channel = ready_channel_jcall,
-               .clone = LDKChannelKeys_JCalls_clone,
-               .write = write_jcall,
-               .free = LDKChannelKeys_JCalls_free,
-               .pubkeys = pubkeys_conv,
-               .set_pubkeys = NULL,
-       };
-       return ret;
-}
-long  __attribute__((visibility("default"))) TS_LDKChannelKeys_new(/*TODO: JS Object Reference */void* o, uint32_t pubkeys) {
-       LDKChannelKeys *res_ptr = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *res_ptr = LDKChannelKeys_init(o, pubkeys);
-       return (long)res_ptr;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_ChannelKeys_get_per_commitment_point(uint32_t this_arg, int64_t idx) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), (this_arg_conv->get_per_commitment_point)(this_arg_conv->this_arg, idx).compressed_form, 33);
-       return arg_arr;
-}
-
-int8_tArray  __attribute__((visibility("default"))) TS_ChannelKeys_release_commitment_secret(uint32_t this_arg, int64_t idx) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       int8_tArray arg_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), (this_arg_conv->release_commitment_secret)(this_arg_conv->this_arg, idx).data, 32);
-       return arg_arr;
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelKeys_key_derivation_params(uint32_t this_arg) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKC2Tuple_u64u64Z* ret_ref = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       *ret_ref = (this_arg_conv->key_derivation_params)(this_arg_conv->this_arg);
-       return (long)ret_ref;
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelKeys_sign_counterparty_commitment(uint32_t this_arg, uint32_t commitment_tx) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKCommitmentTransaction commitment_tx_conv;
-       commitment_tx_conv.inner = (void*)(commitment_tx & (~1));
-       commitment_tx_conv.is_owned = false;
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ), "LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ");
-       *ret_conv = (this_arg_conv->sign_counterparty_commitment)(this_arg_conv->this_arg, &commitment_tx_conv);
-       return (long)ret_conv;
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelKeys_sign_holder_commitment_and_htlcs(uint32_t this_arg, uint32_t commitment_tx) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKHolderCommitmentTransaction commitment_tx_conv;
-       commitment_tx_conv.inner = (void*)(commitment_tx & (~1));
-       commitment_tx_conv.is_owned = false;
-       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ), "LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ");
-       *ret_conv = (this_arg_conv->sign_holder_commitment_and_htlcs)(this_arg_conv->this_arg, &commitment_tx_conv);
-       return (long)ret_conv;
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelKeys_sign_justice_transaction(uint32_t this_arg, int8_tArray justice_tx, int64_t input, int64_t amount, int8_tArray per_commitment_key, uint32_t htlc) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKTransaction justice_tx_ref;
-       justice_tx_ref.datalen = *((uint32_t*)justice_tx);
-       justice_tx_ref.data = MALLOC(justice_tx_ref.datalen, "LDKTransaction Bytes");
-       memcpy(justice_tx_ref.data, (uint8_t*)(justice_tx + 4), justice_tx_ref.datalen);
-       justice_tx_ref.data_is_owned = true;
-       unsigned char per_commitment_key_arr[32];
-       CHECK(*((uint32_t*)per_commitment_key) == 32);
-       memcpy(per_commitment_key_arr, (uint8_t*)(per_commitment_key + 4), 32);
-       unsigned char (*per_commitment_key_ref)[32] = &per_commitment_key_arr;
-       LDKHTLCOutputInCommitment htlc_conv;
-       htlc_conv.inner = (void*)(htlc & (~1));
-       htlc_conv.is_owned = false;
-       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
-       *ret_conv = (this_arg_conv->sign_justice_transaction)(this_arg_conv->this_arg, justice_tx_ref, input, amount, per_commitment_key_ref, &htlc_conv);
-       return (long)ret_conv;
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelKeys_sign_counterparty_htlc_transaction(uint32_t this_arg, int8_tArray htlc_tx, int64_t input, int64_t amount, int8_tArray per_commitment_point, uint32_t htlc) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKTransaction htlc_tx_ref;
-       htlc_tx_ref.datalen = *((uint32_t*)htlc_tx);
-       htlc_tx_ref.data = MALLOC(htlc_tx_ref.datalen, "LDKTransaction Bytes");
-       memcpy(htlc_tx_ref.data, (uint8_t*)(htlc_tx + 4), htlc_tx_ref.datalen);
-       htlc_tx_ref.data_is_owned = true;
-       LDKPublicKey per_commitment_point_ref;
-       CHECK(*((uint32_t*)per_commitment_point) == 33);
-       memcpy(per_commitment_point_ref.compressed_form, (uint8_t*)(per_commitment_point + 4), 33);
-       LDKHTLCOutputInCommitment htlc_conv;
-       htlc_conv.inner = (void*)(htlc & (~1));
-       htlc_conv.is_owned = false;
-       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
-       *ret_conv = (this_arg_conv->sign_counterparty_htlc_transaction)(this_arg_conv->this_arg, htlc_tx_ref, input, amount, per_commitment_point_ref, &htlc_conv);
-       return (long)ret_conv;
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelKeys_sign_closing_transaction(uint32_t this_arg, int8_tArray closing_tx) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKTransaction closing_tx_ref;
-       closing_tx_ref.datalen = *((uint32_t*)closing_tx);
-       closing_tx_ref.data = MALLOC(closing_tx_ref.datalen, "LDKTransaction Bytes");
-       memcpy(closing_tx_ref.data, (uint8_t*)(closing_tx + 4), closing_tx_ref.datalen);
-       closing_tx_ref.data_is_owned = true;
-       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
-       *ret_conv = (this_arg_conv->sign_closing_transaction)(this_arg_conv->this_arg, closing_tx_ref);
-       return (long)ret_conv;
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelKeys_sign_channel_announcement(uint32_t this_arg, uint32_t msg) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKUnsignedChannelAnnouncement msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
-       *ret_conv = (this_arg_conv->sign_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
-       return (long)ret_conv;
-}
-
-void  __attribute__((visibility("default"))) TS_ChannelKeys_ready_channel(uint32_t this_arg, uint32_t channel_parameters) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKChannelTransactionParameters channel_parameters_conv;
-       channel_parameters_conv.inner = (void*)(channel_parameters & (~1));
-       channel_parameters_conv.is_owned = false;
-       (this_arg_conv->ready_channel)(this_arg_conv->this_arg, &channel_parameters_conv);
+uint32_t __attribute__((visibility("default"))) TS_LDKSpendableOutputDescriptor_ref_from_ptr(uint32_t ptr) {
+       LDKSpendableOutputDescriptor *obj = (LDKSpendableOutputDescriptor*)ptr;
+       switch(obj->tag) {
+               case LDKSpendableOutputDescriptor_StaticOutput: {
+                       LDKOutPoint outpoint_var = obj->static_output.outpoint;
+                       CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&outpoint_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long outpoint_ref = (long)outpoint_var.inner & ~1;
+                       long output_ref = ((long)&obj->static_output.output) | 1;
+                       return 0 /* LDKSpendableOutputDescriptor - StaticOutput */; (void) outpoint_ref; (void) (long)output_ref;
+               }
+               case LDKSpendableOutputDescriptor_DelayedPaymentOutput: {
+                       return 0 /* LDKSpendableOutputDescriptor - DelayedPaymentOutput */;
+               }
+               case LDKSpendableOutputDescriptor_StaticPaymentOutput: {
+                       return 0 /* LDKSpendableOutputDescriptor - StaticPaymentOutput */;
+               }
+               default: abort();
+       }
 }
-
-int8_tArray  __attribute__((visibility("default"))) TS_ChannelKeys_write(uint32_t this_arg) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKCVec_u8Z arg_var = (this_arg_conv->write)(this_arg_conv->this_arg);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_SpendableOutputDescriptorZ_new(uint32_tArray elems) {
+       LDKCVec_SpendableOutputDescriptorZ *ret = MALLOC(sizeof(LDKCVec_SpendableOutputDescriptorZ), "LDKCVec_SpendableOutputDescriptorZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * ret->datalen, "LDKCVec_SpendableOutputDescriptorZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKSpendableOutputDescriptor arr_elem_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
+       return (long)ret;
 }
-
-LDKChannelPublicKeys LDKChannelKeys_set_get_pubkeys(LDKChannelKeys* this_arg) {
-       if (this_arg->set_pubkeys != NULL)
-               this_arg->set_pubkeys(this_arg);
-       return this_arg->pubkeys;
+static inline LDKCVec_SpendableOutputDescriptorZ CVec_SpendableOutputDescriptorZ_clone(const LDKCVec_SpendableOutputDescriptorZ *orig) {
+       LDKCVec_SpendableOutputDescriptorZ ret = { .data = MALLOC(sizeof(LDKSpendableOutputDescriptor) * orig->datalen, "LDKCVec_SpendableOutputDescriptorZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = SpendableOutputDescriptor_clone(&orig->data[i]);
+       }
+       return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_ChannelKeys_get_pubkeys(uint32_t this_arg) {
-       LDKChannelKeys* this_arg_conv = (LDKChannelKeys*)this_arg;
-       LDKChannelPublicKeys ret_var = LDKChannelKeys_set_get_pubkeys(this_arg_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
+uint32_t __attribute__((visibility("default"))) TS_LDKEvent_ref_from_ptr(uint32_t ptr) {
+       LDKEvent *obj = (LDKEvent*)ptr;
+       switch(obj->tag) {
+               case LDKEvent_FundingGenerationReady: {
+                       int8_tArray temporary_channel_id_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(temporary_channel_id_arr + 4), obj->funding_generation_ready.temporary_channel_id.data, 32);
+                       LDKCVec_u8Z output_script_var = obj->funding_generation_ready.output_script;
+                       int8_tArray output_script_arr = init_arr(output_script_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(output_script_arr + 4), output_script_var.data, output_script_var.datalen);
+                       return 0 /* LDKEvent - FundingGenerationReady */; (void) temporary_channel_id_arr; (void) obj->funding_generation_ready.channel_value_satoshis; (void) output_script_arr; (void) obj->funding_generation_ready.user_channel_id;
+               }
+               case LDKEvent_FundingBroadcastSafe: {
+                       LDKOutPoint funding_txo_var = obj->funding_broadcast_safe.funding_txo;
+                       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+                       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+                       long funding_txo_ref = (long)funding_txo_var.inner & ~1;
+                       return 0 /* LDKEvent - FundingBroadcastSafe */; (void) funding_txo_ref; (void) obj->funding_broadcast_safe.user_channel_id;
+               }
+               case LDKEvent_PaymentReceived: {
+                       int8_tArray payment_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(payment_hash_arr + 4), obj->payment_received.payment_hash.data, 32);
+                       int8_tArray payment_secret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(payment_secret_arr + 4), obj->payment_received.payment_secret.data, 32);
+                       return 0 /* LDKEvent - PaymentReceived */; (void) payment_hash_arr; (void) payment_secret_arr; (void) obj->payment_received.amt;
+               }
+               case LDKEvent_PaymentSent: {
+                       int8_tArray payment_preimage_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(payment_preimage_arr + 4), obj->payment_sent.payment_preimage.data, 32);
+                       return 0 /* LDKEvent - PaymentSent */; (void) payment_preimage_arr;
+               }
+               case LDKEvent_PaymentFailed: {
+                       int8_tArray payment_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(payment_hash_arr + 4), obj->payment_failed.payment_hash.data, 32);
+                       return 0 /* LDKEvent - PaymentFailed */; (void) payment_hash_arr; (void) obj->payment_failed.rejected_by_dest;
+               }
+               case LDKEvent_PendingHTLCsForwardable: {
+                       return 0 /* LDKEvent - PendingHTLCsForwardable */; (void) obj->pending_htl_cs_forwardable.time_forwardable;
+               }
+               case LDKEvent_SpendableOutputs: {
+                       LDKCVec_SpendableOutputDescriptorZ outputs_var = obj->spendable_outputs.outputs;
+                       uint32_tArray outputs_arr = init_arr(outputs_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+                       uint32_t *outputs_arr_ptr = (uint32_t*)(outputs_arr + 4);
+                       for (size_t b = 0; b < outputs_var.datalen; b++) {
+                               long outputs_conv_27_ref = ((long)&outputs_var.data[b]) | 1;
+                               outputs_arr_ptr[b] = outputs_conv_27_ref;
+                       }
+                       return 0 /* LDKEvent - SpendableOutputs */; (void) outputs_arr;
+               }
+               default: abort();
        }
-       return ret_ref;
 }
-
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_new(int8_tArray a, uint32_t b) {
-       LDKC2Tuple_BlockHashChannelMonitorZ* ret = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
-       LDKThirtyTwoBytes a_ref;
-       CHECK(*((uint32_t*)a) == 32);
-       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
-       ret->a = a_ref;
-       LDKChannelMonitor b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelMonitor_clone(&b_conv);
-       ret->b = b_conv;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_EventZ_new(uint32_tArray elems) {
+       LDKCVec_EventZ *ret = MALLOC(sizeof(LDKCVec_EventZ), "LDKCVec_EventZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKEvent) * ret->datalen, "LDKCVec_EventZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKEvent arr_elem_conv = *(LDKEvent*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
        return (long)ret;
 }
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
-       int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
-       return a_arr;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
-       LDKChannelMonitor b_var = tuple->b;
-       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long b_ref = (long)b_var.inner & ~1;
-       return b_ref;
+static inline LDKCVec_EventZ CVec_EventZ_clone(const LDKCVec_EventZ *orig) {
+       LDKCVec_EventZ ret = { .data = MALLOC(sizeof(LDKEvent) * orig->datalen, "LDKCVec_EventZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = Event_clone(&orig->data[i]);
+       }
+       return ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_OutPointDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_OutPointDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_OutPointDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_OutPointDecodeErrorZ *val = (LDKCResult_OutPointDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       long res_ref = (long)(&(*val->contents.result)) | 1;
+       LDKOutPoint res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_OutPointDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_OutPointDecodeErrorZ *val = (LDKCResult_OutPointDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -1265,17 +1358,20 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHash
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ *val = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       long res_ref = ((long)&(*val->contents.result)) | 1;
+       LDKChannelMonitorUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ *val = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -1283,18 +1379,20 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDe
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_ChanKeySignerDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_HTLCUpdateDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_ChanKeySignerDecodeErrorZ *val = (LDKCResult_ChanKeySignerDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_HTLCUpdateDecodeErrorZ *val = (LDKCResult_HTLCUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *ret = ChannelKeys_clone(&(*val->contents.result));
-       return (long)ret;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChanKeySignerDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_ChanKeySignerDecodeErrorZ *val = (LDKCResult_ChanKeySignerDecodeErrorZ*)(arg & ~1);
+       LDKHTLCUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_HTLCUpdateDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_HTLCUpdateDecodeErrorZ *val = (LDKCResult_HTLCUpdateDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -1302,675 +1400,605 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChanKeySignerDeco
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_InMemoryChannelKeysDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneMonitorUpdateErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NoneMonitorUpdateErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
+void  __attribute__((visibility("default"))) TS_LDKCResult_NoneMonitorUpdateErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NoneMonitorUpdateErrorZ *val = (LDKCResult_NoneMonitorUpdateErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKInMemoryChannelKeys res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+       return *val->contents.result;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ *val = (LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneMonitorUpdateErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NoneMonitorUpdateErrorZ *val = (LDKCResult_NoneMonitorUpdateErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
+       LDKMonitorUpdateError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TxOutAccessErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_TxOutAccessErrorZ*)arg)->result_ok;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxOutAccessErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_TxOutAccessErrorZ *val = (LDKCResult_TxOutAccessErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       long res_ref = ((long)&(*val->contents.result)) | 1;
-       return (long)res_ref;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_new(uint32_t a, int8_tArray b) {
+       LDKC2Tuple_OutPointScriptZ* ret = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       LDKOutPoint a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = OutPoint_clone(&a_conv);
+       ret->a = a_conv;
+       LDKCVec_u8Z b_ref;
+       b_ref.datalen = *((uint32_t*)b);
+       b_ref.data = MALLOC(b_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(b_ref.data, (uint8_t*)(b + 4), b_ref.datalen);
+       ret->b = b_ref;
+       return (long)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxOutAccessErrorZ_get_err(uint32_t arg) {
-       LDKCResult_TxOutAccessErrorZ *val = (LDKCResult_TxOutAccessErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       uint32_t err_conv = LDKAccessError_to_js((*val->contents.err));
-       return err_conv;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_a(uint32_t ptr) {
+       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
+       LDKOutPoint a_var = tuple->a;
+       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long a_ref = (long)a_var.inner & ~1;
+       return a_ref;
 }
-uint32_t __attribute__((visibility("default"))) TS_LDKAPIError_ref_from_ptr(uint32_t ptr) {
-       LDKAPIError *obj = (LDKAPIError*)ptr;
-       switch(obj->tag) {
-               case LDKAPIError_APIMisuseError: {
-                       LDKCVec_u8Z err_var = obj->api_misuse_error.err;
-                       int8_tArray err_arr = init_arr(err_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(err_arr + 4), err_var.data, err_var.datalen);
-                       return 0 /* LDKAPIError - APIMisuseError */; (void) err_arr;
-               }
-               case LDKAPIError_FeeRateTooHigh: {
-                       LDKCVec_u8Z err_var = obj->fee_rate_too_high.err;
-                       int8_tArray err_arr = init_arr(err_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(err_arr + 4), err_var.data, err_var.datalen);
-                       return 0 /* LDKAPIError - FeeRateTooHigh */; (void) err_arr; (void) obj->fee_rate_too_high.feerate;
-               }
-               case LDKAPIError_RouteError: {
-                       LDKStr err_str = obj->route_error.err;
-                       jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len);
-                       return 0 /* LDKAPIError - RouteError */; (void) err_conv;
-               }
-               case LDKAPIError_ChannelUnavailable: {
-                       LDKCVec_u8Z err_var = obj->channel_unavailable.err;
-                       int8_tArray err_arr = init_arr(err_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(err_arr + 4), err_var.data, err_var.datalen);
-                       return 0 /* LDKAPIError - ChannelUnavailable */; (void) err_arr;
-               }
-               case LDKAPIError_MonitorUpdateFailed: {
-                       return 0 /* LDKAPIError - MonitorUpdateFailed */;
-               }
-               default: abort();
-       }
+int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_OutPointScriptZ_get_b(uint32_t ptr) {
+       LDKC2Tuple_OutPointScriptZ *tuple = (LDKC2Tuple_OutPointScriptZ*)(ptr & ~1);
+       LDKCVec_u8Z b_var = tuple->b;
+       int8_tArray b_arr = init_arr(b_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(b_arr + 4), b_var.data, b_var.datalen);
+       return b_arr;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneAPIErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NoneAPIErrorZ*)arg)->result_ok;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_new(int32_t a, uint32_t b) {
+       LDKC2Tuple_u32TxOutZ* ret = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       ret->a = a;
+       LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
+       FREE((void*)b);
+       ret->b = b_conv;
+       return (long)ret;
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_NoneAPIErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NoneAPIErrorZ *val = (LDKCResult_NoneAPIErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
+int32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_a(uint32_t ptr) {
+       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+       return tuple->a;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneAPIErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NoneAPIErrorZ *val = (LDKCResult_NoneAPIErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       long err_ref = ((long)&(*val->contents.err)) | 1;
-       return err_ref;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_u32TxOutZ_get_b(uint32_t ptr) {
+       LDKC2Tuple_u32TxOutZ *tuple = (LDKC2Tuple_u32TxOutZ*)(ptr & ~1);
+       long b_ref = ((long)&tuple->b) | 1;
+       return (long)b_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_ChannelDetailsZ_new(uint32_tArray elems) {
-       LDKCVec_ChannelDetailsZ *ret = MALLOC(sizeof(LDKCVec_ChannelDetailsZ), "LDKCVec_ChannelDetailsZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_u32TxOutZZ_new(uint32_tArray elems) {
+       LDKCVec_C2Tuple_u32TxOutZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_u32TxOutZZ), "LDKCVec_C2Tuple_u32TxOutZZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKChannelDetails) * ret->datalen, "LDKCVec_ChannelDetailsZ Data");
+               ret->data = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ) * ret->datalen, "LDKCVec_C2Tuple_u32TxOutZZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKChannelDetails arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = ChannelDetails_clone(&arr_elem_conv);
+                       LDKC2Tuple_u32TxOutZ arr_elem_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-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 };
+static inline LDKCVec_C2Tuple_u32TxOutZZ CVec_C2Tuple_u32TxOutZZ_clone(const LDKCVec_C2Tuple_u32TxOutZZ *orig) {
+       LDKCVec_C2Tuple_u32TxOutZZ ret = { .data = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ) * orig->datalen, "LDKCVec_C2Tuple_u32TxOutZZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = ChannelDetails_clone(&orig->data[i]);
+               ret.data[i] = C2Tuple_u32TxOutZ_clone(&orig->data[i]);
        }
        return ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NonePaymentSendFailureZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NonePaymentSendFailureZ*)arg)->result_ok;
-}
-void  __attribute__((visibility("default"))) TS_LDKCResult_NonePaymentSendFailureZ_get_ok(uint32_t arg) {
-       LDKCResult_NonePaymentSendFailureZ *val = (LDKCResult_NonePaymentSendFailureZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(int8_tArray a, uint32_tArray b) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       LDKThirtyTwoBytes a_ref;
+       CHECK(*((uint32_t*)a) == 32);
+       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
+       ret->a = a_ref;
+       LDKCVec_C2Tuple_u32TxOutZZ b_constr;
+       b_constr.datalen = *((uint32_t*)b);
+       if (b_constr.datalen > 0)
+               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
+       else
+               b_constr.data = NULL;
+       uint32_t* b_vals = (uint32_t*)(b + 4);
+       for (size_t z = 0; z < b_constr.datalen; z++) {
+               uint32_t b_conv_25 = b_vals[z];
+               LDKC2Tuple_u32TxOutZ b_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1);
+               FREE((void*)b_conv_25);
+               b_constr.data[z] = b_conv_25_conv;
+       }
+       ret->b = b_constr;
+       return (long)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NonePaymentSendFailureZ_get_err(uint32_t arg) {
-       LDKCResult_NonePaymentSendFailureZ *val = (LDKCResult_NonePaymentSendFailureZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKPaymentSendFailure err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(uint32_t ptr) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
+       int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
+       return a_arr;
 }
-uint32_t __attribute__((visibility("default"))) TS_LDKNetAddress_ref_from_ptr(uint32_t ptr) {
-       LDKNetAddress *obj = (LDKNetAddress*)ptr;
-       switch(obj->tag) {
-               case LDKNetAddress_IPv4: {
-                       int8_tArray addr_arr = init_arr(4, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(addr_arr + 4), obj->i_pv4.addr.data, 4);
-                       return 0 /* LDKNetAddress - IPv4 */; (void) addr_arr; (void) obj->i_pv4.port;
-               }
-               case LDKNetAddress_IPv6: {
-                       int8_tArray addr_arr = init_arr(16, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(addr_arr + 4), obj->i_pv6.addr.data, 16);
-                       return 0 /* LDKNetAddress - IPv6 */; (void) addr_arr; (void) obj->i_pv6.port;
-               }
-               case LDKNetAddress_OnionV2: {
-                       int8_tArray addr_arr = init_arr(10, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(addr_arr + 4), obj->onion_v2.addr.data, 10);
-                       return 0 /* LDKNetAddress - OnionV2 */; (void) addr_arr; (void) obj->onion_v2.port;
-               }
-               case LDKNetAddress_OnionV3: {
-                       int8_tArray ed25519_pubkey_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-                       memcpy((uint8_t*)(ed25519_pubkey_arr + 4), obj->onion_v3.ed25519_pubkey.data, 32);
-                       return 0 /* LDKNetAddress - OnionV3 */; (void) ed25519_pubkey_arr; (void) obj->onion_v3.checksum; (void) obj->onion_v3.version; (void) obj->onion_v3.port;
-               }
-               default: abort();
+uint32_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(uint32_t ptr) {
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ *tuple = (LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(ptr & ~1);
+       LDKCVec_C2Tuple_u32TxOutZZ b_var = tuple->b;
+       uint32_tArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+       uint32_t *b_arr_ptr = (uint32_t*)(b_arr + 4);
+       for (size_t z = 0; z < b_var.datalen; z++) {
+               long b_conv_25_ref = (long)(&b_var.data[z]) | 1;
+               b_arr_ptr[z] = b_conv_25_ref;
        }
+       return b_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_NetAddressZ_new(uint32_tArray elems) {
-       LDKCVec_NetAddressZ *ret = MALLOC(sizeof(LDKCVec_NetAddressZ), "LDKCVec_NetAddressZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_new(uint32_tArray elems) {
+       LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ *ret = MALLOC(sizeof(LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKNetAddress) * ret->datalen, "LDKCVec_NetAddressZ Data");
+               ret->data = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ) * ret->datalen, "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKNetAddress arr_elem_conv = *(LDKNetAddress*)(((uint64_t)arr_elem) & ~1);
+                       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ arr_elem_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)arr_elem) & ~1);
                        FREE((void*)arr_elem);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_NetAddressZ CVec_NetAddressZ_clone(const LDKCVec_NetAddressZ *orig) {
-       LDKCVec_NetAddressZ ret = { .data = MALLOC(sizeof(LDKNetAddress) * orig->datalen, "LDKCVec_NetAddressZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = NetAddress_clone(&orig->data[i]);
-       }
-       return ret;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_ChannelMonitorZ_new(uint32_tArray elems) {
-       LDKCVec_ChannelMonitorZ *ret = MALLOC(sizeof(LDKCVec_ChannelMonitorZ), "LDKCVec_ChannelMonitorZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKChannelMonitor) * ret->datalen, "LDKCVec_ChannelMonitorZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKChannelMonitor arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = ChannelMonitor_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_new(int8_tArray a, ptrArray b) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ* ret = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
+       LDKSignature a_ref;
+       CHECK(*((uint32_t*)a) == 64);
+       memcpy(a_ref.compact_form, (uint8_t*)(a + 4), 64);
+       ret->a = a_ref;
+       LDKCVec_SignatureZ b_constr;
+       b_constr.datalen = *((uint32_t*)b);
+       if (b_constr.datalen > 0)
+               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
+       else
+               b_constr.data = NULL;
+       int8_tArray* b_vals = (int8_tArray*)(b + 4);
+       for (size_t m = 0; m < b_constr.datalen; m++) {
+               int8_tArray b_conv_12 = b_vals[m];
+               LDKSignature b_conv_12_ref;
+               CHECK(*((uint32_t*)b_conv_12) == 64);
+               memcpy(b_conv_12_ref.compact_form, (uint8_t*)(b_conv_12 + 4), 64);
+               b_constr.data[m] = b_conv_12_ref;
        }
+       ret->b = b_constr;
        return (long)ret;
 }
-static inline LDKCVec_ChannelMonitorZ CVec_ChannelMonitorZ_clone(const LDKCVec_ChannelMonitorZ *orig) {
-       LDKCVec_ChannelMonitorZ ret = { .data = MALLOC(sizeof(LDKChannelMonitor) * orig->datalen, "LDKCVec_ChannelMonitorZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = ChannelMonitor_clone(&orig->data[i]);
-       }
-       return ret;
+int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_a(uint32_t ptr) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
+       int8_tArray a_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(a_arr + 4), tuple->a.compact_form, 64);
+       return a_arr;
 }
-typedef struct LDKWatch_JCalls {
+ptrArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_SignatureCVec_SignatureZZ_get_b(uint32_t ptr) {
+       LDKC2Tuple_SignatureCVec_SignatureZZ *tuple = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(ptr & ~1);
+       LDKCVec_SignatureZ b_var = tuple->b;
+       ptrArray b_arr = init_arr(b_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
+       int8_tArray *b_arr_ptr = (int8_tArray*)(b_arr + 4);
+       for (size_t m = 0; m < b_var.datalen; m++) {
+               int8_tArray b_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+               memcpy((uint8_t*)(b_conv_12_arr + 4), b_var.data[m].compact_form, 64);
+               b_arr_ptr[m] = b_conv_12_arr;
+       }
+       return b_arr;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_ok(uint32_t arg) {
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = (long)(&(*val->contents.result)) | 1;
+       return res_ref;
+}
+void  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_get_err(uint32_t arg) {
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *val = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SignatureNoneZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_SignatureNoneZ*)arg)->result_ok;
+}
+int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_SignatureNoneZ_get_ok(uint32_t arg) {
+       LDKCResult_SignatureNoneZ *val = (LDKCResult_SignatureNoneZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       int8_tArray res_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(res_arr + 4), (*val->contents.result).compact_form, 64);
+       return res_arr;
+}
+void  __attribute__((visibility("default"))) TS_LDKCResult_SignatureNoneZ_get_err(uint32_t arg) {
+       LDKCResult_SignatureNoneZ *val = (LDKCResult_SignatureNoneZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       return *val->contents.err;
+}
+typedef struct LDKSign_JCalls {
        atomic_size_t refcnt;
-       uint32_t watch_channel_meth;
-       uint32_t update_channel_meth;
-       uint32_t release_pending_monitor_events_meth;
-} LDKWatch_JCalls;
-static void LDKWatch_JCalls_free(void* this_arg) {
-       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       uint32_t get_per_commitment_point_meth;
+       uint32_t release_commitment_secret_meth;
+       uint32_t channel_keys_id_meth;
+       uint32_t sign_counterparty_commitment_meth;
+       uint32_t sign_holder_commitment_and_htlcs_meth;
+       uint32_t sign_justice_transaction_meth;
+       uint32_t sign_counterparty_htlc_transaction_meth;
+       uint32_t sign_closing_transaction_meth;
+       uint32_t sign_channel_announcement_meth;
+       uint32_t ready_channel_meth;
+       uint32_t write_meth;
+} LDKSign_JCalls;
+static void LDKSign_JCalls_free(void* this_arg) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
        if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->watch_channel_meth);
-               js_free(j_calls->update_channel_meth);
-               js_free(j_calls->release_pending_monitor_events_meth);
+               js_free(j_calls->get_per_commitment_point_meth);
+               js_free(j_calls->release_commitment_secret_meth);
+               js_free(j_calls->channel_keys_id_meth);
+               js_free(j_calls->sign_counterparty_commitment_meth);
+               js_free(j_calls->sign_holder_commitment_and_htlcs_meth);
+               js_free(j_calls->sign_justice_transaction_meth);
+               js_free(j_calls->sign_counterparty_htlc_transaction_meth);
+               js_free(j_calls->sign_closing_transaction_meth);
+               js_free(j_calls->sign_channel_announcement_meth);
+               js_free(j_calls->ready_channel_meth);
+               js_free(j_calls->write_meth);
                FREE(j_calls);
        }
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
-       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
-       LDKOutPoint funding_txo_var = funding_txo;
-       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long funding_txo_ref = (long)funding_txo_var.inner;
-       if (funding_txo_var.is_owned) {
-               funding_txo_ref |= 1;
+LDKPublicKey get_per_commitment_point_jcall(const void* this_arg, uint64_t idx) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       int8_tArray ret = js_invoke_function_1(j_calls->get_per_commitment_point_meth, idx);
+       LDKPublicKey ret_ref;
+       CHECK(*((uint32_t*)ret) == 33);
+       memcpy(ret_ref.compressed_form, (uint8_t*)(ret + 4), 33);
+       return ret_ref;
+}
+LDKThirtyTwoBytes release_commitment_secret_jcall(const void* this_arg, uint64_t idx) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       int8_tArray ret = js_invoke_function_1(j_calls->release_commitment_secret_meth, idx);
+       LDKThirtyTwoBytes ret_ref;
+       CHECK(*((uint32_t*)ret) == 32);
+       memcpy(ret_ref.data, (uint8_t*)(ret + 4), 32);
+       return ret_ref;
+}
+LDKThirtyTwoBytes channel_keys_id_jcall(const void* this_arg) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       int8_tArray ret = js_invoke_function_0(j_calls->channel_keys_id_meth);
+       LDKThirtyTwoBytes ret_ref;
+       CHECK(*((uint32_t*)ret) == 32);
+       memcpy(ret_ref.data, (uint8_t*)(ret + 4), 32);
+       return ret_ref;
+}
+LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment_jcall(const void* this_arg, const LDKCommitmentTransaction * commitment_tx) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       LDKCommitmentTransaction commitment_tx_var = *commitment_tx;
+       commitment_tx_var = CommitmentTransaction_clone(commitment_tx);
+       CHECK((((long)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long commitment_tx_ref = (long)commitment_tx_var.inner;
+       if (commitment_tx_var.is_owned) {
+               commitment_tx_ref |= 1;
        }
-       LDKChannelMonitor monitor_var = monitor;
-       CHECK((((long)monitor_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&monitor_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long monitor_ref = (long)monitor_var.inner;
-       if (monitor_var.is_owned) {
-               monitor_ref |= 1;
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)js_invoke_function_1(j_calls->sign_counterparty_commitment_meth, commitment_tx_ref);
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)ret);
+       return ret_conv;
+}
+LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs_jcall(const void* this_arg, const LDKHolderCommitmentTransaction * commitment_tx) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       LDKHolderCommitmentTransaction commitment_tx_var = *commitment_tx;
+       commitment_tx_var = HolderCommitmentTransaction_clone(commitment_tx);
+       CHECK((((long)commitment_tx_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&commitment_tx_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long commitment_tx_ref = (long)commitment_tx_var.inner;
+       if (commitment_tx_var.is_owned) {
+               commitment_tx_ref |= 1;
        }
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_2(j_calls->watch_channel_meth, funding_txo_ref, monitor_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret = (LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)js_invoke_function_1(j_calls->sign_holder_commitment_and_htlcs_meth, commitment_tx_ref);
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_conv = *(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone((LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ*)ret);
        return ret_conv;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
-       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
-       LDKOutPoint funding_txo_var = funding_txo;
-       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long funding_txo_ref = (long)funding_txo_var.inner;
-       if (funding_txo_var.is_owned) {
-               funding_txo_ref |= 1;
+LDKCResult_SignatureNoneZ sign_justice_transaction_jcall(const void* this_arg, LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (* per_commitment_key)[32], const LDKHTLCOutputInCommitment * htlc) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       LDKTransaction justice_tx_var = justice_tx;
+       int8_tArray justice_tx_arr = init_arr(justice_tx_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(justice_tx_arr + 4), justice_tx_var.data, justice_tx_var.datalen);
+       Transaction_free(justice_tx_var);
+       int8_tArray per_commitment_key_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(per_commitment_key_arr + 4), *per_commitment_key, 32);
+       LDKHTLCOutputInCommitment htlc_var = *htlc;
+       htlc_var = HTLCOutputInCommitment_clone(htlc);
+       CHECK((((long)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long htlc_ref = (long)htlc_var.inner;
+       if (htlc_var.is_owned) {
+               htlc_ref |= 1;
        }
-       LDKChannelMonitorUpdate update_var = update;
-       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long update_ref = (long)update_var.inner;
-       if (update_var.is_owned) {
-               update_ref |= 1;
+       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)js_invoke_function_5(j_calls->sign_justice_transaction_meth, justice_tx_arr, input, amount, per_commitment_key_arr, htlc_ref);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
+       return ret_conv;
+}
+LDKCResult_SignatureNoneZ sign_counterparty_htlc_transaction_jcall(const void* this_arg, LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, LDKPublicKey per_commitment_point, const LDKHTLCOutputInCommitment * htlc) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       LDKTransaction htlc_tx_var = htlc_tx;
+       int8_tArray htlc_tx_arr = init_arr(htlc_tx_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(htlc_tx_arr + 4), htlc_tx_var.data, htlc_tx_var.datalen);
+       Transaction_free(htlc_tx_var);
+       int8_tArray per_commitment_point_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(per_commitment_point_arr + 4), per_commitment_point.compressed_form, 33);
+       LDKHTLCOutputInCommitment htlc_var = *htlc;
+       htlc_var = HTLCOutputInCommitment_clone(htlc);
+       CHECK((((long)htlc_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&htlc_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long htlc_ref = (long)htlc_var.inner;
+       if (htlc_var.is_owned) {
+               htlc_ref |= 1;
        }
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_2(j_calls->update_channel_meth, funding_txo_ref, update_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)js_invoke_function_5(j_calls->sign_counterparty_htlc_transaction_meth, htlc_tx_arr, input, amount, per_commitment_point_arr, htlc_ref);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
        return ret_conv;
 }
-LDKCVec_MonitorEventZ release_pending_monitor_events_jcall(const void* this_arg) {
-       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
-       uint32_tArray arg = js_invoke_function_0(j_calls->release_pending_monitor_events_meth);
-       LDKCVec_MonitorEventZ arg_constr;
-       arg_constr.datalen = *((uint32_t*)arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
-       else
-               arg_constr.data = NULL;
-       uint32_t* arg_vals = (uint32_t*)(arg + 4);
-       for (size_t o = 0; o < arg_constr.datalen; o++) {
-               uint32_t arr_conv_14 = arg_vals[o];
-               LDKMonitorEvent arr_conv_14_conv;
-               arr_conv_14_conv.inner = (void*)(arr_conv_14 & (~1));
-               arr_conv_14_conv.is_owned = (arr_conv_14 & 1) || (arr_conv_14 == 0);
-               arr_conv_14_conv = MonitorEvent_clone(&arr_conv_14_conv);
-               arg_constr.data[o] = arr_conv_14_conv;
-       }
-       return arg_constr;
+LDKCResult_SignatureNoneZ sign_closing_transaction_jcall(const void* this_arg, LDKTransaction closing_tx) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       LDKTransaction closing_tx_var = closing_tx;
+       int8_tArray closing_tx_arr = init_arr(closing_tx_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(closing_tx_arr + 4), closing_tx_var.data, closing_tx_var.datalen);
+       Transaction_free(closing_tx_var);
+       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)js_invoke_function_1(j_calls->sign_closing_transaction_meth, closing_tx_arr);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
+       return ret_conv;
 }
-static void* LDKWatch_JCalls_clone(const void* this_arg) {
-       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+LDKCResult_SignatureNoneZ sign_channel_announcement_jcall(const void* this_arg, const LDKUnsignedChannelAnnouncement * msg) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       LDKUnsignedChannelAnnouncement msg_var = *msg;
+       msg_var = UnsignedChannelAnnouncement_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_SignatureNoneZ* ret = (LDKCResult_SignatureNoneZ*)js_invoke_function_1(j_calls->sign_channel_announcement_meth, msg_ref);
+       LDKCResult_SignatureNoneZ ret_conv = *(LDKCResult_SignatureNoneZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_SignatureNoneZ_clone((LDKCResult_SignatureNoneZ*)ret);
+       return ret_conv;
+}
+void ready_channel_jcall(void* this_arg, const LDKChannelTransactionParameters * channel_parameters) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       LDKChannelTransactionParameters channel_parameters_var = *channel_parameters;
+       channel_parameters_var = ChannelTransactionParameters_clone(channel_parameters);
+       CHECK((((long)channel_parameters_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&channel_parameters_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long channel_parameters_ref = (long)channel_parameters_var.inner;
+       if (channel_parameters_var.is_owned) {
+               channel_parameters_ref |= 1;
+       }
+       js_invoke_function_1(j_calls->ready_channel_meth, channel_parameters_ref);
+}
+LDKCVec_u8Z write_jcall(const void* this_arg) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
+       int8_tArray ret = js_invoke_function_0(j_calls->write_meth);
+       LDKCVec_u8Z ret_ref;
+       ret_ref.datalen = *((uint32_t*)ret);
+       ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(ret_ref.data, (uint8_t*)(ret + 4), ret_ref.datalen);
+       return ret_ref;
+}
+static void* LDKSign_JCalls_clone(const void* this_arg) {
+       LDKSign_JCalls *j_calls = (LDKSign_JCalls*) this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
        return (void*) this_arg;
 }
-static inline LDKWatch LDKWatch_init (/*TODO: JS Object Reference */void* o) {
-       LDKWatch_JCalls *calls = MALLOC(sizeof(LDKWatch_JCalls), "LDKWatch_JCalls");
+static inline LDKSign LDKSign_init (/*TODO: JS Object Reference */void* o, uint32_t pubkeys) {
+       LDKSign_JCalls *calls = MALLOC(sizeof(LDKSign_JCalls), "LDKSign_JCalls");
        atomic_init(&calls->refcnt, 1);
        //TODO: Assign calls->o from o
 
-       LDKWatch ret = {
+       LDKChannelPublicKeys pubkeys_conv;
+       pubkeys_conv.inner = (void*)(pubkeys & (~1));
+       pubkeys_conv.is_owned = (pubkeys & 1) || (pubkeys == 0);
+       pubkeys_conv = ChannelPublicKeys_clone(&pubkeys_conv);
+
+       LDKSign ret = {
                .this_arg = (void*) calls,
-               .watch_channel = watch_channel_jcall,
-               .update_channel = update_channel_jcall,
-               .release_pending_monitor_events = release_pending_monitor_events_jcall,
-               .free = LDKWatch_JCalls_free,
+               .get_per_commitment_point = get_per_commitment_point_jcall,
+               .release_commitment_secret = release_commitment_secret_jcall,
+               .channel_keys_id = channel_keys_id_jcall,
+               .sign_counterparty_commitment = sign_counterparty_commitment_jcall,
+               .sign_holder_commitment_and_htlcs = sign_holder_commitment_and_htlcs_jcall,
+               .sign_justice_transaction = sign_justice_transaction_jcall,
+               .sign_counterparty_htlc_transaction = sign_counterparty_htlc_transaction_jcall,
+               .sign_closing_transaction = sign_closing_transaction_jcall,
+               .sign_channel_announcement = sign_channel_announcement_jcall,
+               .ready_channel = ready_channel_jcall,
+               .clone = LDKSign_JCalls_clone,
+               .write = write_jcall,
+               .free = LDKSign_JCalls_free,
+               .pubkeys = pubkeys_conv,
+               .set_pubkeys = NULL,
        };
        return ret;
 }
-long  __attribute__((visibility("default"))) TS_LDKWatch_new(/*TODO: JS Object Reference */void* o) {
-       LDKWatch *res_ptr = MALLOC(sizeof(LDKWatch), "LDKWatch");
-       *res_ptr = LDKWatch_init(o);
+long  __attribute__((visibility("default"))) TS_LDKSign_new(/*TODO: JS Object Reference */void* o, uint32_t pubkeys) {
+       LDKSign *res_ptr = MALLOC(sizeof(LDKSign), "LDKSign");
+       *res_ptr = LDKSign_init(o, pubkeys);
        return (long)res_ptr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_Watch_watch_channel(uint32_t this_arg, uint32_t funding_txo, uint32_t monitor) {
-       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
-       LDKOutPoint funding_txo_conv;
-       funding_txo_conv.inner = (void*)(funding_txo & (~1));
-       funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
-       funding_txo_conv = OutPoint_clone(&funding_txo_conv);
-       LDKChannelMonitor monitor_conv;
-       monitor_conv.inner = (void*)(monitor & (~1));
-       monitor_conv.is_owned = (monitor & 1) || (monitor == 0);
-       monitor_conv = ChannelMonitor_clone(&monitor_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv);
-       return (long)ret_conv;
+int8_tArray  __attribute__((visibility("default"))) TS_Sign_get_per_commitment_point(uint32_t this_arg, int64_t idx) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), (this_arg_conv->get_per_commitment_point)(this_arg_conv->this_arg, idx).compressed_form, 33);
+       return ret_arr;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_Watch_update_channel(uint32_t this_arg, uint32_t funding_txo, uint32_t update) {
-       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
-       LDKOutPoint funding_txo_conv;
-       funding_txo_conv.inner = (void*)(funding_txo & (~1));
-       funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
-       funding_txo_conv = OutPoint_clone(&funding_txo_conv);
-       LDKChannelMonitorUpdate update_conv;
-       update_conv.inner = (void*)(update & (~1));
-       update_conv.is_owned = (update & 1) || (update == 0);
-       update_conv = ChannelMonitorUpdate_clone(&update_conv);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv);
-       return (long)ret_conv;
+int8_tArray  __attribute__((visibility("default"))) TS_Sign_release_commitment_secret(uint32_t this_arg, int64_t idx) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), (this_arg_conv->release_commitment_secret)(this_arg_conv->this_arg, idx).data, 32);
+       return ret_arr;
 }
 
-uint32_tArray  __attribute__((visibility("default"))) TS_Watch_release_pending_monitor_events(uint32_t this_arg) {
-       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
-       LDKCVec_MonitorEventZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
-       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
-       for (size_t o = 0; o < ret_var.datalen; o++) {
-               LDKMonitorEvent arr_conv_14_var = ret_var.data[o];
-               CHECK((((long)arr_conv_14_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_14_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_14_ref = (long)arr_conv_14_var.inner;
-               if (arr_conv_14_var.is_owned) {
-                       arr_conv_14_ref |= 1;
-               }
-               ret_arr_ptr[o] = arr_conv_14_ref;
-       }
-       FREE(ret_var.data);
+int8_tArray  __attribute__((visibility("default"))) TS_Sign_channel_keys_id(uint32_t this_arg) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), (this_arg_conv->channel_keys_id)(this_arg_conv->this_arg).data, 32);
        return ret_arr;
 }
 
-typedef struct LDKBroadcasterInterface_JCalls {
-       atomic_size_t refcnt;
-       uint32_t broadcast_transaction_meth;
-} LDKBroadcasterInterface_JCalls;
-static void LDKBroadcasterInterface_JCalls_free(void* this_arg) {
-       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->broadcast_transaction_meth);
-               FREE(j_calls);
-       }
-}
-void broadcast_transaction_jcall(const void* this_arg, LDKTransaction tx) {
-       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
-       LDKTransaction tx_var = tx;
-       int8_tArray tx_arr = init_arr(tx_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(tx_arr + 4), tx_var.data, tx_var.datalen);
-       Transaction_free(tx_var);
-       js_invoke_function_1(j_calls->broadcast_transaction_meth, tx_arr);
-}
-static void* LDKBroadcasterInterface_JCalls_clone(const void* this_arg) {
-       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+uint32_t  __attribute__((visibility("default"))) TS_Sign_sign_counterparty_commitment(uint32_t this_arg, uint32_t commitment_tx) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKCommitmentTransaction commitment_tx_conv;
+       commitment_tx_conv.inner = (void*)(commitment_tx & (~1));
+       commitment_tx_conv.is_owned = false;
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ), "LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ");
+       *ret_conv = (this_arg_conv->sign_counterparty_commitment)(this_arg_conv->this_arg, &commitment_tx_conv);
+       return (long)ret_conv;
 }
-static inline LDKBroadcasterInterface LDKBroadcasterInterface_init (/*TODO: JS Object Reference */void* o) {
-       LDKBroadcasterInterface_JCalls *calls = MALLOC(sizeof(LDKBroadcasterInterface_JCalls), "LDKBroadcasterInterface_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKBroadcasterInterface ret = {
-               .this_arg = (void*) calls,
-               .broadcast_transaction = broadcast_transaction_jcall,
-               .free = LDKBroadcasterInterface_JCalls_free,
-       };
-       return ret;
-}
-long  __attribute__((visibility("default"))) TS_LDKBroadcasterInterface_new(/*TODO: JS Object Reference */void* o) {
-       LDKBroadcasterInterface *res_ptr = MALLOC(sizeof(LDKBroadcasterInterface), "LDKBroadcasterInterface");
-       *res_ptr = LDKBroadcasterInterface_init(o);
-       return (long)res_ptr;
-}
-void  __attribute__((visibility("default"))) TS_BroadcasterInterface_broadcast_transaction(uint32_t this_arg, int8_tArray tx) {
-       LDKBroadcasterInterface* this_arg_conv = (LDKBroadcasterInterface*)this_arg;
-       LDKTransaction tx_ref;
-       tx_ref.datalen = *((uint32_t*)tx);
-       tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes");
-       memcpy(tx_ref.data, (uint8_t*)(tx + 4), tx_ref.datalen);
-       tx_ref.data_is_owned = true;
-       (this_arg_conv->broadcast_transaction)(this_arg_conv->this_arg, tx_ref);
+uint32_t  __attribute__((visibility("default"))) TS_Sign_sign_holder_commitment_and_htlcs(uint32_t this_arg, uint32_t commitment_tx) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKHolderCommitmentTransaction commitment_tx_conv;
+       commitment_tx_conv.inner = (void*)(commitment_tx & (~1));
+       commitment_tx_conv.is_owned = false;
+       LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ), "LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ");
+       *ret_conv = (this_arg_conv->sign_holder_commitment_and_htlcs)(this_arg_conv->this_arg, &commitment_tx_conv);
+       return (long)ret_conv;
 }
 
-typedef struct LDKKeysInterface_JCalls {
-       atomic_size_t refcnt;
-       uint32_t get_node_secret_meth;
-       uint32_t get_destination_script_meth;
-       uint32_t get_shutdown_pubkey_meth;
-       uint32_t get_channel_keys_meth;
-       uint32_t get_secure_random_bytes_meth;
-       uint32_t read_chan_signer_meth;
-} LDKKeysInterface_JCalls;
-static void LDKKeysInterface_JCalls_free(void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->get_node_secret_meth);
-               js_free(j_calls->get_destination_script_meth);
-               js_free(j_calls->get_shutdown_pubkey_meth);
-               js_free(j_calls->get_channel_keys_meth);
-               js_free(j_calls->get_secure_random_bytes_meth);
-               js_free(j_calls->read_chan_signer_meth);
-               FREE(j_calls);
-       }
-}
-LDKSecretKey get_node_secret_jcall(const void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       int8_tArray arg = js_invoke_function_0(j_calls->get_node_secret_meth);
-       LDKSecretKey arg_ref;
-       CHECK(*((uint32_t*)arg) == 32);
-       memcpy(arg_ref.bytes, (uint8_t*)(arg + 4), 32);
-       return arg_ref;
-}
-LDKCVec_u8Z get_destination_script_jcall(const void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       int8_tArray arg = js_invoke_function_0(j_calls->get_destination_script_meth);
-       LDKCVec_u8Z arg_ref;
-       arg_ref.datalen = *((uint32_t*)arg);
-       arg_ref.data = MALLOC(arg_ref.datalen, "LDKCVec_u8Z Bytes");
-       memcpy(arg_ref.data, (uint8_t*)(arg + 4), arg_ref.datalen);
-       return arg_ref;
-}
-LDKPublicKey get_shutdown_pubkey_jcall(const void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       int8_tArray arg = js_invoke_function_0(j_calls->get_shutdown_pubkey_meth);
-       LDKPublicKey arg_ref;
-       CHECK(*((uint32_t*)arg) == 33);
-       memcpy(arg_ref.compressed_form, (uint8_t*)(arg + 4), 33);
-       return arg_ref;
-}
-LDKChannelKeys get_channel_keys_jcall(const void* this_arg, bool inbound, uint64_t channel_value_satoshis) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       LDKChannelKeys* ret = (LDKChannelKeys*)js_invoke_function_2(j_calls->get_channel_keys_meth, inbound, channel_value_satoshis);
-       LDKChannelKeys ret_conv = *(LDKChannelKeys*)(((uint64_t)ret) & ~1);
-       ret_conv = ChannelKeys_clone(ret);
-       return ret_conv;
-}
-LDKThirtyTwoBytes get_secure_random_bytes_jcall(const void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       int8_tArray arg = js_invoke_function_0(j_calls->get_secure_random_bytes_meth);
-       LDKThirtyTwoBytes arg_ref;
-       CHECK(*((uint32_t*)arg) == 32);
-       memcpy(arg_ref.data, (uint8_t*)(arg + 4), 32);
-       return arg_ref;
-}
-LDKCResult_ChanKeySignerDecodeErrorZ read_chan_signer_jcall(const void* this_arg, LDKu8slice reader) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       LDKu8slice reader_var = reader;
-       int8_tArray reader_arr = init_arr(reader_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(reader_arr + 4), reader_var.data, reader_var.datalen);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret = (LDKCResult_ChanKeySignerDecodeErrorZ*)js_invoke_function_1(j_calls->read_chan_signer_meth, reader_arr);
-       LDKCResult_ChanKeySignerDecodeErrorZ ret_conv = *(LDKCResult_ChanKeySignerDecodeErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_ChanKeySignerDecodeErrorZ_clone((LDKCResult_ChanKeySignerDecodeErrorZ*)ret);
-       return ret_conv;
-}
-static void* LDKKeysInterface_JCalls_clone(const void* this_arg) {
-       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+uint32_t  __attribute__((visibility("default"))) TS_Sign_sign_justice_transaction(uint32_t this_arg, int8_tArray justice_tx, int64_t input, int64_t amount, int8_tArray per_commitment_key, uint32_t htlc) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKTransaction justice_tx_ref;
+       justice_tx_ref.datalen = *((uint32_t*)justice_tx);
+       justice_tx_ref.data = MALLOC(justice_tx_ref.datalen, "LDKTransaction Bytes");
+       memcpy(justice_tx_ref.data, (uint8_t*)(justice_tx + 4), justice_tx_ref.datalen);
+       justice_tx_ref.data_is_owned = true;
+       unsigned char per_commitment_key_arr[32];
+       CHECK(*((uint32_t*)per_commitment_key) == 32);
+       memcpy(per_commitment_key_arr, (uint8_t*)(per_commitment_key + 4), 32);
+       unsigned char (*per_commitment_key_ref)[32] = &per_commitment_key_arr;
+       LDKHTLCOutputInCommitment htlc_conv;
+       htlc_conv.inner = (void*)(htlc & (~1));
+       htlc_conv.is_owned = false;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_justice_transaction)(this_arg_conv->this_arg, justice_tx_ref, input, amount, per_commitment_key_ref, &htlc_conv);
+       return (long)ret_conv;
 }
-static inline LDKKeysInterface LDKKeysInterface_init (/*TODO: JS Object Reference */void* o) {
-       LDKKeysInterface_JCalls *calls = MALLOC(sizeof(LDKKeysInterface_JCalls), "LDKKeysInterface_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKKeysInterface ret = {
-               .this_arg = (void*) calls,
-               .get_node_secret = get_node_secret_jcall,
-               .get_destination_script = get_destination_script_jcall,
-               .get_shutdown_pubkey = get_shutdown_pubkey_jcall,
-               .get_channel_keys = get_channel_keys_jcall,
-               .get_secure_random_bytes = get_secure_random_bytes_jcall,
-               .read_chan_signer = read_chan_signer_jcall,
-               .free = LDKKeysInterface_JCalls_free,
-       };
-       return ret;
-}
-long  __attribute__((visibility("default"))) TS_LDKKeysInterface_new(/*TODO: JS Object Reference */void* o) {
-       LDKKeysInterface *res_ptr = MALLOC(sizeof(LDKKeysInterface), "LDKKeysInterface");
-       *res_ptr = LDKKeysInterface_init(o);
-       return (long)res_ptr;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_KeysInterface_get_node_secret(uint32_t this_arg) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       int8_tArray arg_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), (this_arg_conv->get_node_secret)(this_arg_conv->this_arg).bytes, 32);
-       return arg_arr;
+uint32_t  __attribute__((visibility("default"))) TS_Sign_sign_counterparty_htlc_transaction(uint32_t this_arg, int8_tArray htlc_tx, int64_t input, int64_t amount, int8_tArray per_commitment_point, uint32_t htlc) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKTransaction htlc_tx_ref;
+       htlc_tx_ref.datalen = *((uint32_t*)htlc_tx);
+       htlc_tx_ref.data = MALLOC(htlc_tx_ref.datalen, "LDKTransaction Bytes");
+       memcpy(htlc_tx_ref.data, (uint8_t*)(htlc_tx + 4), htlc_tx_ref.datalen);
+       htlc_tx_ref.data_is_owned = true;
+       LDKPublicKey per_commitment_point_ref;
+       CHECK(*((uint32_t*)per_commitment_point) == 33);
+       memcpy(per_commitment_point_ref.compressed_form, (uint8_t*)(per_commitment_point + 4), 33);
+       LDKHTLCOutputInCommitment htlc_conv;
+       htlc_conv.inner = (void*)(htlc & (~1));
+       htlc_conv.is_owned = false;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_counterparty_htlc_transaction)(this_arg_conv->this_arg, htlc_tx_ref, input, amount, per_commitment_point_ref, &htlc_conv);
+       return (long)ret_conv;
 }
 
-int8_tArray  __attribute__((visibility("default"))) TS_KeysInterface_get_destination_script(uint32_t this_arg) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       LDKCVec_u8Z arg_var = (this_arg_conv->get_destination_script)(this_arg_conv->this_arg);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+uint32_t  __attribute__((visibility("default"))) TS_Sign_sign_closing_transaction(uint32_t this_arg, int8_tArray closing_tx) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKTransaction closing_tx_ref;
+       closing_tx_ref.datalen = *((uint32_t*)closing_tx);
+       closing_tx_ref.data = MALLOC(closing_tx_ref.datalen, "LDKTransaction Bytes");
+       memcpy(closing_tx_ref.data, (uint8_t*)(closing_tx + 4), closing_tx_ref.datalen);
+       closing_tx_ref.data_is_owned = true;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_closing_transaction)(this_arg_conv->this_arg, closing_tx_ref);
+       return (long)ret_conv;
 }
 
-int8_tArray  __attribute__((visibility("default"))) TS_KeysInterface_get_shutdown_pubkey(uint32_t this_arg) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), (this_arg_conv->get_shutdown_pubkey)(this_arg_conv->this_arg).compressed_form, 33);
-       return arg_arr;
+uint32_t  __attribute__((visibility("default"))) TS_Sign_sign_channel_announcement(uint32_t this_arg, uint32_t msg) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKUnsignedChannelAnnouncement msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_SignatureNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_SignatureNoneZ), "LDKCResult_SignatureNoneZ");
+       *ret_conv = (this_arg_conv->sign_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_KeysInterface_get_channel_keys(uint32_t this_arg, jboolean inbound, int64_t channel_value_satoshis) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *ret = (this_arg_conv->get_channel_keys)(this_arg_conv->this_arg, inbound, channel_value_satoshis);
-       return (long)ret;
+void  __attribute__((visibility("default"))) TS_Sign_ready_channel(uint32_t this_arg, uint32_t channel_parameters) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKChannelTransactionParameters channel_parameters_conv;
+       channel_parameters_conv.inner = (void*)(channel_parameters & (~1));
+       channel_parameters_conv.is_owned = false;
+       (this_arg_conv->ready_channel)(this_arg_conv->this_arg, &channel_parameters_conv);
 }
 
-int8_tArray  __attribute__((visibility("default"))) TS_KeysInterface_get_secure_random_bytes(uint32_t this_arg) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       int8_tArray arg_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), (this_arg_conv->get_secure_random_bytes)(this_arg_conv->this_arg).data, 32);
-       return arg_arr;
+int8_tArray  __attribute__((visibility("default"))) TS_Sign_write(uint32_t this_arg) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKCVec_u8Z ret_var = (this_arg_conv->write)(this_arg_conv->this_arg);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_KeysInterface_read_chan_signer(uint32_t this_arg, int8_tArray reader) {
-       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
-       LDKu8slice reader_ref;
-       reader_ref.datalen = *((uint32_t*)reader);
-       reader_ref.data = (int8_t*)(reader + 4);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = (this_arg_conv->read_chan_signer)(this_arg_conv->this_arg, reader_ref);
-       return (long)ret_conv;
+LDKChannelPublicKeys LDKSign_set_get_pubkeys(LDKSign* this_arg) {
+       if (this_arg->set_pubkeys != NULL)
+               this_arg->set_pubkeys(this_arg);
+       return this_arg->pubkeys;
 }
-
-typedef struct LDKFeeEstimator_JCalls {
-       atomic_size_t refcnt;
-       uint32_t get_est_sat_per_1000_weight_meth;
-} LDKFeeEstimator_JCalls;
-static void LDKFeeEstimator_JCalls_free(void* this_arg) {
-       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->get_est_sat_per_1000_weight_meth);
-               FREE(j_calls);
+uint32_t  __attribute__((visibility("default"))) TS_Sign_get_pubkeys(uint32_t this_arg) {
+       LDKSign* this_arg_conv = (LDKSign*)this_arg;
+       LDKChannelPublicKeys ret_var = LDKSign_set_get_pubkeys(this_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
        }
+       return ret_ref;
 }
-uint32_t get_est_sat_per_1000_weight_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
-       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
-       uint32_t confirmation_target_conv = LDKConfirmationTarget_to_js(confirmation_target);
-       return js_invoke_function_1(j_calls->get_est_sat_per_1000_weight_meth, confirmation_target_conv);
+
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_new(int8_tArray a, uint32_t b) {
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       LDKThirtyTwoBytes a_ref;
+       CHECK(*((uint32_t*)a) == 32);
+       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
+       ret->a = a_ref;
+       LDKChannelMonitor b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelMonitor_clone(&b_conv);
+       ret->b = b_conv;
+       return (long)ret;
 }
-static void* LDKFeeEstimator_JCalls_clone(const void* this_arg) {
-       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_a(uint32_t ptr) {
+       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
+       int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
+       return a_arr;
 }
-static inline LDKFeeEstimator LDKFeeEstimator_init (/*TODO: JS Object Reference */void* o) {
-       LDKFeeEstimator_JCalls *calls = MALLOC(sizeof(LDKFeeEstimator_JCalls), "LDKFeeEstimator_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
-
-       LDKFeeEstimator ret = {
-               .this_arg = (void*) calls,
-               .get_est_sat_per_1000_weight = get_est_sat_per_1000_weight_jcall,
-               .free = LDKFeeEstimator_JCalls_free,
-       };
-       return ret;
-}
-long  __attribute__((visibility("default"))) TS_LDKFeeEstimator_new(/*TODO: JS Object Reference */void* o) {
-       LDKFeeEstimator *res_ptr = MALLOC(sizeof(LDKFeeEstimator), "LDKFeeEstimator");
-       *res_ptr = LDKFeeEstimator_init(o);
-       return (long)res_ptr;
-}
-int32_t  __attribute__((visibility("default"))) TS_FeeEstimator_get_est_sat_per_1000_weight(uint32_t this_arg, uint32_t confirmation_target) {
-       LDKFeeEstimator* this_arg_conv = (LDKFeeEstimator*)this_arg;
-       LDKConfirmationTarget confirmation_target_conv = LDKConfirmationTarget_from_js(confirmation_target);
-       int32_t ret_val = (this_arg_conv->get_est_sat_per_1000_weight)(this_arg_conv->this_arg, confirmation_target_conv);
-       return ret_val;
-}
-
-typedef struct LDKLogger_JCalls {
-       atomic_size_t refcnt;
-       uint32_t log_meth;
-} LDKLogger_JCalls;
-static void LDKLogger_JCalls_free(void* this_arg) {
-       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->log_meth);
-               FREE(j_calls);
-       }
-}
-void log_jcall(const void* this_arg, const char* record) {
-       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
-       const char* record_str = record;
-       jstring record_conv = str_ref_to_ts(record_str, strlen(record_str));
-       js_invoke_function_1(j_calls->log_meth, record_conv);
-}
-static void* LDKLogger_JCalls_clone(const void* this_arg) {
-       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
-}
-static inline LDKLogger LDKLogger_init (/*TODO: JS Object Reference */void* o) {
-       LDKLogger_JCalls *calls = MALLOC(sizeof(LDKLogger_JCalls), "LDKLogger_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
-
-       LDKLogger ret = {
-               .this_arg = (void*) calls,
-               .log = log_jcall,
-               .free = LDKLogger_JCalls_free,
-       };
-       return ret;
-}
-long  __attribute__((visibility("default"))) TS_LDKLogger_new(/*TODO: JS Object Reference */void* o) {
-       LDKLogger *res_ptr = MALLOC(sizeof(LDKLogger), "LDKLogger");
-       *res_ptr = LDKLogger_init(o);
-       return (long)res_ptr;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_new(int8_tArray a, uint32_t b) {
-       LDKC2Tuple_BlockHashChannelManagerZ* ret = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
-       LDKThirtyTwoBytes a_ref;
-       CHECK(*((uint32_t*)a) == 32);
-       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
-       ret->a = a_ref;
-       LDKChannelManager b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelManager
-       ret->b = b_conv;
-       return (long)ret;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_a(uint32_t ptr) {
-       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
-       int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
-       return a_arr;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_b(uint32_t ptr) {
-       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
-       LDKChannelManager b_var = tuple->b;
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelMonitorZ_get_b(uint32_t ptr) {
+       LDKC2Tuple_BlockHashChannelMonitorZ *tuple = (LDKC2Tuple_BlockHashChannelMonitorZ*)(ptr & ~1);
+       LDKChannelMonitor b_var = tuple->b;
        CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long b_ref = (long)b_var.inner & ~1;
        return b_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
        long res_ref = (long)(&(*val->contents.result)) | 1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -1978,297 +2006,406 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHash
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NetAddressu8Z_result_ok(uint32_t arg) {
-       return ((LDKCResult_NetAddressu8Z*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TxOutAccessErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_TxOutAccessErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetAddressu8Z_get_ok(uint32_t arg) {
-       LDKCResult_NetAddressu8Z *val = (LDKCResult_NetAddressu8Z*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxOutAccessErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_TxOutAccessErrorZ *val = (LDKCResult_TxOutAccessErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
        long res_ref = ((long)&(*val->contents.result)) | 1;
-       return res_ref;
+       return (long)res_ref;
 }
-int8_t  __attribute__((visibility("default"))) TS_LDKCResult_NetAddressu8Z_get_err(uint32_t arg) {
-       LDKCResult_NetAddressu8Z *val = (LDKCResult_NetAddressu8Z*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxOutAccessErrorZ_get_err(uint32_t arg) {
+       LDKCResult_TxOutAccessErrorZ *val = (LDKCResult_TxOutAccessErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       return *val->contents.err;
+       uint32_t err_conv = LDKAccessError_to_js((*val->contents.err));
+       return err_conv;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)arg)->result_ok;
+uint32_t __attribute__((visibility("default"))) TS_LDKAPIError_ref_from_ptr(uint32_t ptr) {
+       LDKAPIError *obj = (LDKAPIError*)ptr;
+       switch(obj->tag) {
+               case LDKAPIError_APIMisuseError: {
+                       LDKCVec_u8Z err_var = obj->api_misuse_error.err;
+                       int8_tArray err_arr = init_arr(err_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(err_arr + 4), err_var.data, err_var.datalen);
+                       return 0 /* LDKAPIError - APIMisuseError */; (void) err_arr;
+               }
+               case LDKAPIError_FeeRateTooHigh: {
+                       LDKCVec_u8Z err_var = obj->fee_rate_too_high.err;
+                       int8_tArray err_arr = init_arr(err_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(err_arr + 4), err_var.data, err_var.datalen);
+                       return 0 /* LDKAPIError - FeeRateTooHigh */; (void) err_arr; (void) obj->fee_rate_too_high.feerate;
+               }
+               case LDKAPIError_RouteError: {
+                       LDKStr err_str = obj->route_error.err;
+                       jstring err_conv = str_ref_to_ts(err_str.chars, err_str.len);
+                       return 0 /* LDKAPIError - RouteError */; (void) err_conv;
+               }
+               case LDKAPIError_ChannelUnavailable: {
+                       LDKCVec_u8Z err_var = obj->channel_unavailable.err;
+                       int8_tArray err_arr = init_arr(err_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+                       memcpy((uint8_t*)(err_arr + 4), err_var.data, err_var.datalen);
+                       return 0 /* LDKAPIError - ChannelUnavailable */; (void) err_arr;
+               }
+               case LDKAPIError_MonitorUpdateFailed: {
+                       return 0 /* LDKAPIError - MonitorUpdateFailed */;
+               }
+               default: abort();
+       }
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *val = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(arg & ~1);
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneAPIErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NoneAPIErrorZ*)arg)->result_ok;
+}
+void  __attribute__((visibility("default"))) TS_LDKCResult_NoneAPIErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NoneAPIErrorZ *val = (LDKCResult_NoneAPIErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKCResult_NetAddressu8Z* res_conv = MALLOC(sizeof(LDKCResult_NetAddressu8Z), "LDKCResult_NetAddressu8Z");
-       *res_conv = (*val->contents.result);
-       *res_conv = CResult_NetAddressu8Z_clone(res_conv);
-       return (long)res_conv;
+       return *val->contents.result;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *val = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneAPIErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NoneAPIErrorZ *val = (LDKCResult_NoneAPIErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
+       long err_ref = ((long)&(*val->contents.err)) | 1;
        return err_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_u64Z_new(int64_tArray elems) {
-       LDKCVec_u64Z *ret = MALLOC(sizeof(LDKCVec_u64Z), "LDKCVec_u64Z");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_CResult_NoneAPIErrorZZ_new(uint32_tArray elems) {
+       LDKCVec_CResult_NoneAPIErrorZZ *ret = MALLOC(sizeof(LDKCVec_CResult_NoneAPIErrorZZ), "LDKCVec_CResult_NoneAPIErrorZZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(uint64_t) * ret->datalen, "LDKCVec_u64Z Data");
-               int64_t *java_elems = (int64_t*)(elems + 4);
+               ret->data = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ) * ret->datalen, "LDKCVec_CResult_NoneAPIErrorZZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
-                       ret->data[i] = java_elems[i];
+                       uint32_t arr_elem = java_elems[i];
+                       LDKCResult_NoneAPIErrorZ arr_elem_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_u64Z CVec_u64Z_clone(const LDKCVec_u64Z *orig) {
-       LDKCVec_u64Z ret = { .data = MALLOC(sizeof(int64_t) * orig->datalen, "LDKCVec_u64Z clone bytes"), .datalen = orig->datalen };
-       memcpy(ret.data, orig->data, sizeof(int64_t) * ret.datalen);
+static inline LDKCVec_CResult_NoneAPIErrorZZ CVec_CResult_NoneAPIErrorZZ_clone(const LDKCVec_CResult_NoneAPIErrorZZ *orig) {
+       LDKCVec_CResult_NoneAPIErrorZZ ret = { .data = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ) * orig->datalen, "LDKCVec_CResult_NoneAPIErrorZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = CResult_NoneAPIErrorZ_clone(&orig->data[i]);
+       }
        return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_UpdateAddHTLCZ_new(uint32_tArray elems) {
-       LDKCVec_UpdateAddHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateAddHTLCZ), "LDKCVec_UpdateAddHTLCZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_APIErrorZ_new(uint32_tArray elems) {
+       LDKCVec_APIErrorZ *ret = MALLOC(sizeof(LDKCVec_APIErrorZ), "LDKCVec_APIErrorZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKUpdateAddHTLC) * ret->datalen, "LDKCVec_UpdateAddHTLCZ Data");
+               ret->data = MALLOC(sizeof(LDKAPIError) * ret->datalen, "LDKCVec_APIErrorZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKUpdateAddHTLC arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = UpdateAddHTLC_clone(&arr_elem_conv);
+                       LDKAPIError arr_elem_conv = *(LDKAPIError*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_UpdateAddHTLCZ CVec_UpdateAddHTLCZ_clone(const LDKCVec_UpdateAddHTLCZ *orig) {
-       LDKCVec_UpdateAddHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateAddHTLC) * orig->datalen, "LDKCVec_UpdateAddHTLCZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_APIErrorZ CVec_APIErrorZ_clone(const LDKCVec_APIErrorZ *orig) {
+       LDKCVec_APIErrorZ ret = { .data = MALLOC(sizeof(LDKAPIError) * orig->datalen, "LDKCVec_APIErrorZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = UpdateAddHTLC_clone(&orig->data[i]);
+               ret.data[i] = APIError_clone(&orig->data[i]);
        }
        return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_UpdateFulfillHTLCZ_new(uint32_tArray elems) {
-       LDKCVec_UpdateFulfillHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFulfillHTLCZ), "LDKCVec_UpdateFulfillHTLCZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_ChannelDetailsZ_new(uint32_tArray elems) {
+       LDKCVec_ChannelDetailsZ *ret = MALLOC(sizeof(LDKCVec_ChannelDetailsZ), "LDKCVec_ChannelDetailsZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKUpdateFulfillHTLC) * ret->datalen, "LDKCVec_UpdateFulfillHTLCZ Data");
+               ret->data = MALLOC(sizeof(LDKChannelDetails) * ret->datalen, "LDKCVec_ChannelDetailsZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKUpdateFulfillHTLC arr_elem_conv;
+                       LDKChannelDetails arr_elem_conv;
                        arr_elem_conv.inner = (void*)(arr_elem & (~1));
                        arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = UpdateFulfillHTLC_clone(&arr_elem_conv);
+                       arr_elem_conv = ChannelDetails_clone(&arr_elem_conv);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_UpdateFulfillHTLCZ CVec_UpdateFulfillHTLCZ_clone(const LDKCVec_UpdateFulfillHTLCZ *orig) {
-       LDKCVec_UpdateFulfillHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFulfillHTLC) * orig->datalen, "LDKCVec_UpdateFulfillHTLCZ clone bytes"), .datalen = orig->datalen };
+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++) {
-               ret.data[i] = UpdateFulfillHTLC_clone(&orig->data[i]);
+               ret.data[i] = ChannelDetails_clone(&orig->data[i]);
        }
        return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_UpdateFailHTLCZ_new(uint32_tArray elems) {
-       LDKCVec_UpdateFailHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFailHTLCZ), "LDKCVec_UpdateFailHTLCZ");
+uint32_t __attribute__((visibility("default"))) TS_LDKPaymentSendFailure_ref_from_ptr(uint32_t ptr) {
+       LDKPaymentSendFailure *obj = (LDKPaymentSendFailure*)ptr;
+       switch(obj->tag) {
+               case LDKPaymentSendFailure_ParameterError: {
+                       return 0 /* LDKPaymentSendFailure - ParameterError */;
+               }
+               case LDKPaymentSendFailure_PathParameterError: {
+                       return 0 /* LDKPaymentSendFailure - PathParameterError */;
+               }
+               case LDKPaymentSendFailure_AllFailedRetrySafe: {
+                       return 0 /* LDKPaymentSendFailure - AllFailedRetrySafe */;
+               }
+               case LDKPaymentSendFailure_PartialFailure: {
+                       return 0 /* LDKPaymentSendFailure - PartialFailure */;
+               }
+               default: abort();
+       }
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NonePaymentSendFailureZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NonePaymentSendFailureZ*)arg)->result_ok;
+}
+void  __attribute__((visibility("default"))) TS_LDKCResult_NonePaymentSendFailureZ_get_ok(uint32_t arg) {
+       LDKCResult_NonePaymentSendFailureZ *val = (LDKCResult_NonePaymentSendFailureZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       return *val->contents.result;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NonePaymentSendFailureZ_get_err(uint32_t arg) {
+       LDKCResult_NonePaymentSendFailureZ *val = (LDKCResult_NonePaymentSendFailureZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       long err_ref = ((long)&(*val->contents.err)) | 1;
+       return err_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_ChannelMonitorZ_new(uint32_tArray elems) {
+       LDKCVec_ChannelMonitorZ *ret = MALLOC(sizeof(LDKCVec_ChannelMonitorZ), "LDKCVec_ChannelMonitorZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKUpdateFailHTLC) * ret->datalen, "LDKCVec_UpdateFailHTLCZ Data");
+               ret->data = MALLOC(sizeof(LDKChannelMonitor) * ret->datalen, "LDKCVec_ChannelMonitorZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKUpdateFailHTLC arr_elem_conv;
+                       LDKChannelMonitor arr_elem_conv;
                        arr_elem_conv.inner = (void*)(arr_elem & (~1));
                        arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = UpdateFailHTLC_clone(&arr_elem_conv);
+                       arr_elem_conv = ChannelMonitor_clone(&arr_elem_conv);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_UpdateFailHTLCZ CVec_UpdateFailHTLCZ_clone(const LDKCVec_UpdateFailHTLCZ *orig) {
-       LDKCVec_UpdateFailHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFailHTLC) * orig->datalen, "LDKCVec_UpdateFailHTLCZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_ChannelMonitorZ CVec_ChannelMonitorZ_clone(const LDKCVec_ChannelMonitorZ *orig) {
+       LDKCVec_ChannelMonitorZ ret = { .data = MALLOC(sizeof(LDKChannelMonitor) * orig->datalen, "LDKCVec_ChannelMonitorZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = UpdateFailHTLC_clone(&orig->data[i]);
+               ret.data[i] = ChannelMonitor_clone(&orig->data[i]);
        }
        return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_UpdateFailMalformedHTLCZ_new(uint32_tArray elems) {
-       LDKCVec_UpdateFailMalformedHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFailMalformedHTLCZ), "LDKCVec_UpdateFailMalformedHTLCZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKUpdateFailMalformedHTLC) * ret->datalen, "LDKCVec_UpdateFailMalformedHTLCZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKUpdateFailMalformedHTLC arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = UpdateFailMalformedHTLC_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
+typedef struct LDKWatch_JCalls {
+       atomic_size_t refcnt;
+       uint32_t watch_channel_meth;
+       uint32_t update_channel_meth;
+       uint32_t release_pending_monitor_events_meth;
+} LDKWatch_JCalls;
+static void LDKWatch_JCalls_free(void* this_arg) {
+       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->watch_channel_meth);
+               js_free(j_calls->update_channel_meth);
+               js_free(j_calls->release_pending_monitor_events_meth);
+               FREE(j_calls);
        }
-       return (long)ret;
 }
-static inline LDKCVec_UpdateFailMalformedHTLCZ CVec_UpdateFailMalformedHTLCZ_clone(const LDKCVec_UpdateFailMalformedHTLCZ *orig) {
-       LDKCVec_UpdateFailMalformedHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFailMalformedHTLC) * orig->datalen, "LDKCVec_UpdateFailMalformedHTLCZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = UpdateFailMalformedHTLC_clone(&orig->data[i]);
+LDKCResult_NoneChannelMonitorUpdateErrZ watch_channel_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitor monitor) {
+       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       LDKOutPoint funding_txo_var = funding_txo;
+       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long funding_txo_ref = (long)funding_txo_var.inner;
+       if (funding_txo_var.is_owned) {
+               funding_txo_ref |= 1;
        }
-       return ret;
+       LDKChannelMonitor monitor_var = monitor;
+       CHECK((((long)monitor_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&monitor_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long monitor_ref = (long)monitor_var.inner;
+       if (monitor_var.is_owned) {
+               monitor_ref |= 1;
+       }
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_2(j_calls->watch_channel_meth, funding_txo_ref, monitor_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_boolLightningErrorZ*)arg)->result_ok;
+LDKCResult_NoneChannelMonitorUpdateErrZ update_channel_jcall(const void* this_arg, LDKOutPoint funding_txo, LDKChannelMonitorUpdate update) {
+       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       LDKOutPoint funding_txo_var = funding_txo;
+       CHECK((((long)funding_txo_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&funding_txo_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long funding_txo_ref = (long)funding_txo_var.inner;
+       if (funding_txo_var.is_owned) {
+               funding_txo_ref |= 1;
+       }
+       LDKChannelMonitorUpdate update_var = update;
+       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long update_ref = (long)update_var.inner;
+       if (update_var.is_owned) {
+               update_ref |= 1;
+       }
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_2(j_calls->update_channel_meth, funding_txo_ref, update_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
+LDKCVec_MonitorEventZ release_pending_monitor_events_jcall(const void* this_arg) {
+       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       uint32_tArray ret = js_invoke_function_0(j_calls->release_pending_monitor_events_meth);
+       LDKCVec_MonitorEventZ ret_constr;
+       ret_constr.datalen = *((uint32_t*)ret);
+       if (ret_constr.datalen > 0)
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+       else
+               ret_constr.data = NULL;
+       uint32_t* ret_vals = (uint32_t*)(ret + 4);
+       for (size_t o = 0; o < ret_constr.datalen; o++) {
+               uint32_t ret_conv_14 = ret_vals[o];
+               LDKMonitorEvent ret_conv_14_conv = *(LDKMonitorEvent*)(((uint64_t)ret_conv_14) & ~1);
+               ret_conv_14_conv = MonitorEvent_clone((LDKMonitorEvent*)ret_conv_14);
+               ret_constr.data[o] = ret_conv_14_conv;
+       }
+       return ret_constr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_boolLightningErrorZ_get_err(uint32_t arg) {
-       LDKCResult_boolLightningErrorZ *val = (LDKCResult_boolLightningErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+static void* LDKWatch_JCalls_clone(const void* this_arg) {
+       LDKWatch_JCalls *j_calls = (LDKWatch_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-       LDKChannelAnnouncement a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = ChannelAnnouncement_clone(&a_conv);
-       ret->a = a_conv;
-       LDKChannelUpdate b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelUpdate_clone(&b_conv);
-       ret->b = b_conv;
-       LDKChannelUpdate c_conv;
-       c_conv.inner = (void*)(c & (~1));
-       c_conv.is_owned = (c & 1) || (c == 0);
-       c_conv = ChannelUpdate_clone(&c_conv);
-       ret->c = c_conv;
-       return (long)ret;
+static inline LDKWatch LDKWatch_init (/*TODO: JS Object Reference */void* o) {
+       LDKWatch_JCalls *calls = MALLOC(sizeof(LDKWatch_JCalls), "LDKWatch_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKWatch ret = {
+               .this_arg = (void*) calls,
+               .watch_channel = watch_channel_jcall,
+               .update_channel = update_channel_jcall,
+               .release_pending_monitor_events = release_pending_monitor_events_jcall,
+               .free = LDKWatch_JCalls_free,
+       };
+       return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(uint32_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelAnnouncement a_var = tuple->a;
-       CHECK((((long)a_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&a_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long a_ref = (long)a_var.inner & ~1;
-       return a_ref;
+long  __attribute__((visibility("default"))) TS_LDKWatch_new(/*TODO: JS Object Reference */void* o) {
+       LDKWatch *res_ptr = MALLOC(sizeof(LDKWatch), "LDKWatch");
+       *res_ptr = LDKWatch_init(o);
+       return (long)res_ptr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(uint32_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelUpdate b_var = tuple->b;
-       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long b_ref = (long)b_var.inner & ~1;
-       return b_ref;
+uint32_t  __attribute__((visibility("default"))) TS_Watch_watch_channel(uint32_t this_arg, uint32_t funding_txo, uint32_t monitor) {
+       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
+       LDKOutPoint funding_txo_conv;
+       funding_txo_conv.inner = (void*)(funding_txo & (~1));
+       funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
+       funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+       LDKChannelMonitor monitor_conv;
+       monitor_conv.inner = (void*)(monitor & (~1));
+       monitor_conv.is_owned = (monitor & 1) || (monitor == 0);
+       monitor_conv = ChannelMonitor_clone(&monitor_conv);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->watch_channel)(this_arg_conv->this_arg, funding_txo_conv, monitor_conv);
+       return (long)ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(uint32_t ptr) {
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *tuple = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(ptr & ~1);
-       LDKChannelUpdate c_var = tuple->c;
-       CHECK((((long)c_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&c_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long c_ref = (long)c_var.inner & ~1;
-       return c_ref;
+
+uint32_t  __attribute__((visibility("default"))) TS_Watch_update_channel(uint32_t this_arg, uint32_t funding_txo, uint32_t update) {
+       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
+       LDKOutPoint funding_txo_conv;
+       funding_txo_conv.inner = (void*)(funding_txo & (~1));
+       funding_txo_conv.is_owned = (funding_txo & 1) || (funding_txo == 0);
+       funding_txo_conv = OutPoint_clone(&funding_txo_conv);
+       LDKChannelMonitorUpdate update_conv;
+       update_conv.inner = (void*)(update & (~1));
+       update_conv.is_owned = (update & 1) || (update == 0);
+       update_conv = ChannelMonitorUpdate_clone(&update_conv);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->update_channel)(this_arg_conv->this_arg, funding_txo_conv, update_conv);
+       return (long)ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(uint32_tArray elems) {
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ *ret = MALLOC(sizeof(LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ) * ret->datalen, "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_elem_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_elem) & ~1);
-                       FREE((void*)arr_elem);
-                       ret->data[i] = arr_elem_conv;
-               }
+
+uint32_tArray  __attribute__((visibility("default"))) TS_Watch_release_pending_monitor_events(uint32_t this_arg) {
+       LDKWatch* this_arg_conv = (LDKWatch*)this_arg;
+       LDKCVec_MonitorEventZ ret_var = (this_arg_conv->release_pending_monitor_events)(this_arg_conv->this_arg);
+       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+       for (size_t o = 0; o < ret_var.datalen; o++) {
+               LDKMonitorEvent *ret_conv_14_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
+               *ret_conv_14_copy = MonitorEvent_clone(&ret_var.data[o]);
+               long ret_conv_14_ref = (long)ret_conv_14_copy;
+               ret_arr_ptr[o] = ret_conv_14_ref;
        }
-       return (long)ret;
+       FREE(ret_var.data);
+       return ret_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_NodeAnnouncementZ_new(uint32_tArray elems) {
-       LDKCVec_NodeAnnouncementZ *ret = MALLOC(sizeof(LDKCVec_NodeAnnouncementZ), "LDKCVec_NodeAnnouncementZ");
-       ret->datalen = *((uint32_t*)elems);
-       if (ret->datalen == 0) {
-               ret->data = NULL;
-       } else {
-               ret->data = MALLOC(sizeof(LDKNodeAnnouncement) * ret->datalen, "LDKCVec_NodeAnnouncementZ Data");
-               uint32_t *java_elems = (uint32_t*)(elems + 4);
-               for (size_t i = 0; i < ret->datalen; i++) {
-                       uint32_t arr_elem = java_elems[i];
-                       LDKNodeAnnouncement arr_elem_conv;
-                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
-                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = NodeAnnouncement_clone(&arr_elem_conv);
-                       ret->data[i] = arr_elem_conv;
-               }
+
+typedef struct LDKBroadcasterInterface_JCalls {
+       atomic_size_t refcnt;
+       uint32_t broadcast_transaction_meth;
+} LDKBroadcasterInterface_JCalls;
+static void LDKBroadcasterInterface_JCalls_free(void* this_arg) {
+       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->broadcast_transaction_meth);
+               FREE(j_calls);
        }
-       return (long)ret;
 }
-static inline LDKCVec_NodeAnnouncementZ CVec_NodeAnnouncementZ_clone(const LDKCVec_NodeAnnouncementZ *orig) {
-       LDKCVec_NodeAnnouncementZ ret = { .data = MALLOC(sizeof(LDKNodeAnnouncement) * orig->datalen, "LDKCVec_NodeAnnouncementZ clone bytes"), .datalen = orig->datalen };
-       for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = NodeAnnouncement_clone(&orig->data[i]);
-       }
-       return ret;
+void broadcast_transaction_jcall(const void* this_arg, LDKTransaction tx) {
+       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
+       LDKTransaction tx_var = tx;
+       int8_tArray tx_arr = init_arr(tx_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(tx_arr + 4), tx_var.data, tx_var.datalen);
+       Transaction_free(tx_var);
+       js_invoke_function_1(j_calls->broadcast_transaction_meth, tx_arr);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NoneLightningErrorZ*)arg)->result_ok;
+static void* LDKBroadcasterInterface_JCalls_clone(const void* this_arg) {
+       LDKBroadcasterInterface_JCalls *j_calls = (LDKBroadcasterInterface_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
+static inline LDKBroadcasterInterface LDKBroadcasterInterface_init (/*TODO: JS Object Reference */void* o) {
+       LDKBroadcasterInterface_JCalls *calls = MALLOC(sizeof(LDKBroadcasterInterface_JCalls), "LDKBroadcasterInterface_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKBroadcasterInterface ret = {
+               .this_arg = (void*) calls,
+               .broadcast_transaction = broadcast_transaction_jcall,
+               .free = LDKBroadcasterInterface_JCalls_free,
+       };
+       return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NoneLightningErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NoneLightningErrorZ *val = (LDKCResult_NoneLightningErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+long  __attribute__((visibility("default"))) TS_LDKBroadcasterInterface_new(/*TODO: JS Object Reference */void* o) {
+       LDKBroadcasterInterface *res_ptr = MALLOC(sizeof(LDKBroadcasterInterface), "LDKBroadcasterInterface");
+       *res_ptr = LDKBroadcasterInterface_init(o);
+       return (long)res_ptr;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_ChannelReestablishDecodeErrorZ*)arg)->result_ok;
+void  __attribute__((visibility("default"))) TS_BroadcasterInterface_broadcast_transaction(uint32_t this_arg, int8_tArray tx) {
+       LDKBroadcasterInterface* this_arg_conv = (LDKBroadcasterInterface*)this_arg;
+       LDKTransaction tx_ref;
+       tx_ref.datalen = *((uint32_t*)tx);
+       tx_ref.data = MALLOC(tx_ref.datalen, "LDKTransaction Bytes");
+       memcpy(tx_ref.data, (uint8_t*)(tx + 4), tx_ref.datalen);
+       tx_ref.data_is_owned = true;
+       (this_arg_conv->broadcast_transaction)(this_arg_conv->this_arg, tx_ref);
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SignDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_SignDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SignDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_SignDecodeErrorZ *val = (LDKCResult_SignDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKChannelReestablish res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+       LDKSign* ret = MALLOC(sizeof(LDKSign), "LDKSign");
+       *ret = Sign_clone(&(*val->contents.result));
+       return (long)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SignDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_SignDecodeErrorZ *val = (LDKCResult_SignDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2276,146 +2413,273 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablis
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_InitDecodeErrorZ*)arg)->result_ok;
+typedef struct LDKKeysInterface_JCalls {
+       atomic_size_t refcnt;
+       uint32_t get_node_secret_meth;
+       uint32_t get_destination_script_meth;
+       uint32_t get_shutdown_pubkey_meth;
+       uint32_t get_channel_signer_meth;
+       uint32_t get_secure_random_bytes_meth;
+       uint32_t read_chan_signer_meth;
+} LDKKeysInterface_JCalls;
+static void LDKKeysInterface_JCalls_free(void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->get_node_secret_meth);
+               js_free(j_calls->get_destination_script_meth);
+               js_free(j_calls->get_shutdown_pubkey_meth);
+               js_free(j_calls->get_channel_signer_meth);
+               js_free(j_calls->get_secure_random_bytes_meth);
+               js_free(j_calls->read_chan_signer_meth);
+               FREE(j_calls);
+       }
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKInit res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+LDKSecretKey get_node_secret_jcall(const void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       int8_tArray ret = js_invoke_function_0(j_calls->get_node_secret_meth);
+       LDKSecretKey ret_ref;
+       CHECK(*((uint32_t*)ret) == 32);
+       memcpy(ret_ref.bytes, (uint8_t*)(ret + 4), 32);
+       return ret_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+LDKCVec_u8Z get_destination_script_jcall(const void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       int8_tArray ret = js_invoke_function_0(j_calls->get_destination_script_meth);
+       LDKCVec_u8Z ret_ref;
+       ret_ref.datalen = *((uint32_t*)ret);
+       ret_ref.data = MALLOC(ret_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(ret_ref.data, (uint8_t*)(ret + 4), ret_ref.datalen);
+       return ret_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PingDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_PingDecodeErrorZ*)arg)->result_ok;
+LDKPublicKey get_shutdown_pubkey_jcall(const void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       int8_tArray ret = js_invoke_function_0(j_calls->get_shutdown_pubkey_meth);
+       LDKPublicKey ret_ref;
+       CHECK(*((uint32_t*)ret) == 33);
+       memcpy(ret_ref.compressed_form, (uint8_t*)(ret + 4), 33);
+       return ret_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PingDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKPing res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+LDKSign get_channel_signer_jcall(const void* this_arg, bool inbound, uint64_t channel_value_satoshis) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       LDKSign* ret = (LDKSign*)js_invoke_function_2(j_calls->get_channel_signer_meth, inbound, channel_value_satoshis);
+       LDKSign ret_conv = *(LDKSign*)(((uint64_t)ret) & ~1);
+       ret_conv = Sign_clone(ret);
+       return ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PingDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+LDKThirtyTwoBytes get_secure_random_bytes_jcall(const void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       int8_tArray ret = js_invoke_function_0(j_calls->get_secure_random_bytes_meth);
+       LDKThirtyTwoBytes ret_ref;
+       CHECK(*((uint32_t*)ret) == 32);
+       memcpy(ret_ref.data, (uint8_t*)(ret + 4), 32);
+       return ret_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PongDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_PongDecodeErrorZ*)arg)->result_ok;
+LDKCResult_SignDecodeErrorZ read_chan_signer_jcall(const void* this_arg, LDKu8slice reader) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       LDKu8slice reader_var = reader;
+       int8_tArray reader_arr = init_arr(reader_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(reader_arr + 4), reader_var.data, reader_var.datalen);
+       LDKCResult_SignDecodeErrorZ* ret = (LDKCResult_SignDecodeErrorZ*)js_invoke_function_1(j_calls->read_chan_signer_meth, reader_arr);
+       LDKCResult_SignDecodeErrorZ ret_conv = *(LDKCResult_SignDecodeErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_SignDecodeErrorZ_clone((LDKCResult_SignDecodeErrorZ*)ret);
+       return ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PongDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKPong res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+static void* LDKKeysInterface_JCalls_clone(const void* this_arg) {
+       LDKKeysInterface_JCalls *j_calls = (LDKKeysInterface_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PongDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+static inline LDKKeysInterface LDKKeysInterface_init (/*TODO: JS Object Reference */void* o) {
+       LDKKeysInterface_JCalls *calls = MALLOC(sizeof(LDKKeysInterface_JCalls), "LDKKeysInterface_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKKeysInterface ret = {
+               .this_arg = (void*) calls,
+               .get_node_secret = get_node_secret_jcall,
+               .get_destination_script = get_destination_script_jcall,
+               .get_shutdown_pubkey = get_shutdown_pubkey_jcall,
+               .get_channel_signer = get_channel_signer_jcall,
+               .get_secure_random_bytes = get_secure_random_bytes_jcall,
+               .read_chan_signer = read_chan_signer_jcall,
+               .free = LDKKeysInterface_JCalls_free,
+       };
+       return ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)arg)->result_ok;
+long  __attribute__((visibility("default"))) TS_LDKKeysInterface_new(/*TODO: JS Object Reference */void* o) {
+       LDKKeysInterface *res_ptr = MALLOC(sizeof(LDKKeysInterface), "LDKKeysInterface");
+       *res_ptr = LDKKeysInterface_init(o);
+       return (long)res_ptr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKUnsignedChannelAnnouncement res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+int8_tArray  __attribute__((visibility("default"))) TS_KeysInterface_get_node_secret(uint32_t this_arg) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), (this_arg_conv->get_node_secret)(this_arg_conv->this_arg).bytes, 32);
+       return ret_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+int8_tArray  __attribute__((visibility("default"))) TS_KeysInterface_get_destination_script(uint32_t this_arg) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       LDKCVec_u8Z ret_var = (this_arg_conv->get_destination_script)(this_arg_conv->this_arg);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)arg)->result_ok;
+
+int8_tArray  __attribute__((visibility("default"))) TS_KeysInterface_get_shutdown_pubkey(uint32_t this_arg) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), (this_arg_conv->get_shutdown_pubkey)(this_arg_conv->this_arg).compressed_form, 33);
+       return ret_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKUnsignedChannelUpdate res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+uint32_t  __attribute__((visibility("default"))) TS_KeysInterface_get_channel_signer(uint32_t this_arg, jboolean inbound, int64_t channel_value_satoshis) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       LDKSign* ret = MALLOC(sizeof(LDKSign), "LDKSign");
+       *ret = (this_arg_conv->get_channel_signer)(this_arg_conv->this_arg, inbound, channel_value_satoshis);
+       return (long)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+
+int8_tArray  __attribute__((visibility("default"))) TS_KeysInterface_get_secure_random_bytes(uint32_t this_arg) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), (this_arg_conv->get_secure_random_bytes)(this_arg_conv->this_arg).data, 32);
+       return ret_arr;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ErrorMessageDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_ErrorMessageDecodeErrorZ*)arg)->result_ok;
+
+uint32_t  __attribute__((visibility("default"))) TS_KeysInterface_read_chan_signer(uint32_t this_arg, int8_tArray reader) {
+       LDKKeysInterface* this_arg_conv = (LDKKeysInterface*)this_arg;
+       LDKu8slice reader_ref;
+       reader_ref.datalen = *((uint32_t*)reader);
+       reader_ref.data = (int8_t*)(reader + 4);
+       LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
+       *ret_conv = (this_arg_conv->read_chan_signer)(this_arg_conv->this_arg, reader_ref);
+       return (long)ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ErrorMessageDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKErrorMessage res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+
+typedef struct LDKFeeEstimator_JCalls {
+       atomic_size_t refcnt;
+       uint32_t get_est_sat_per_1000_weight_meth;
+} LDKFeeEstimator_JCalls;
+static void LDKFeeEstimator_JCalls_free(void* this_arg) {
+       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->get_est_sat_per_1000_weight_meth);
+               FREE(j_calls);
+       }
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ErrorMessageDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+uint32_t get_est_sat_per_1000_weight_jcall(const void* this_arg, LDKConfirmationTarget confirmation_target) {
+       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
+       uint32_t confirmation_target_conv = LDKConfirmationTarget_to_js(confirmation_target);
+       return js_invoke_function_1(j_calls->get_est_sat_per_1000_weight_meth, confirmation_target_conv);
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)arg)->result_ok;
+static void* LDKFeeEstimator_JCalls_clone(const void* this_arg) {
+       LDKFeeEstimator_JCalls *j_calls = (LDKFeeEstimator_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKUnsignedNodeAnnouncement res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
+static inline LDKFeeEstimator LDKFeeEstimator_init (/*TODO: JS Object Reference */void* o) {
+       LDKFeeEstimator_JCalls *calls = MALLOC(sizeof(LDKFeeEstimator_JCalls), "LDKFeeEstimator_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKFeeEstimator ret = {
+               .this_arg = (void*) calls,
+               .get_est_sat_per_1000_weight = get_est_sat_per_1000_weight_jcall,
+               .free = LDKFeeEstimator_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKFeeEstimator_new(/*TODO: JS Object Reference */void* o) {
+       LDKFeeEstimator *res_ptr = MALLOC(sizeof(LDKFeeEstimator), "LDKFeeEstimator");
+       *res_ptr = LDKFeeEstimator_init(o);
+       return (long)res_ptr;
+}
+int32_t  __attribute__((visibility("default"))) TS_FeeEstimator_get_est_sat_per_1000_weight(uint32_t this_arg, uint32_t confirmation_target) {
+       LDKFeeEstimator* this_arg_conv = (LDKFeeEstimator*)this_arg;
+       LDKConfirmationTarget confirmation_target_conv = LDKConfirmationTarget_from_js(confirmation_target);
+       int32_t ret_val = (this_arg_conv->get_est_sat_per_1000_weight)(this_arg_conv->this_arg, confirmation_target_conv);
+       return ret_val;
+}
+
+typedef struct LDKLogger_JCalls {
+       atomic_size_t refcnt;
+       uint32_t log_meth;
+} LDKLogger_JCalls;
+static void LDKLogger_JCalls_free(void* this_arg) {
+       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->log_meth);
+               FREE(j_calls);
+       }
+}
+void log_jcall(const void* this_arg, const char* record) {
+       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
+       const char* record_str = record;
+       jstring record_conv = str_ref_to_ts(record_str, strlen(record_str));
+       js_invoke_function_1(j_calls->log_meth, record_conv);
+}
+static void* LDKLogger_JCalls_clone(const void* this_arg) {
+       LDKLogger_JCalls *j_calls = (LDKLogger_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKLogger LDKLogger_init (/*TODO: JS Object Reference */void* o) {
+       LDKLogger_JCalls *calls = MALLOC(sizeof(LDKLogger_JCalls), "LDKLogger_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKLogger ret = {
+               .this_arg = (void*) calls,
+               .log = log_jcall,
+               .free = LDKLogger_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKLogger_new(/*TODO: JS Object Reference */void* o) {
+       LDKLogger *res_ptr = MALLOC(sizeof(LDKLogger), "LDKLogger");
+       *res_ptr = LDKLogger_init(o);
+       return (long)res_ptr;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_new(int8_tArray a, uint32_t b) {
+       LDKC2Tuple_BlockHashChannelManagerZ* ret = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       LDKThirtyTwoBytes a_ref;
+       CHECK(*((uint32_t*)a) == 32);
+       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
+       ret->a = a_ref;
+       LDKChannelManager b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       // Warning: we need a move here but no clone is available for LDKChannelManager
+       ret->b = b_conv;
+       return (long)ret;
+}
+int8_tArray  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_a(uint32_t ptr) {
+       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
+       int8_tArray a_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(a_arr + 4), tuple->a.data, 32);
+       return a_arr;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKC2Tuple_BlockHashChannelManagerZ_get_b(uint32_t ptr) {
+       LDKC2Tuple_BlockHashChannelManagerZ *tuple = (LDKC2Tuple_BlockHashChannelManagerZ*)(ptr & ~1);
+       LDKChannelManager b_var = tuple->b;
+       CHECK((((long)b_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&b_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long b_ref = (long)b_var.inner & ~1;
+       return b_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       long res_ref = (long)(&(*val->contents.result)) | 1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ *val = (LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2423,20 +2687,17 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedNodeAnnou
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_QueryShortChannelIdsDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKQueryShortChannelIds res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
+       long res_ref = ((long)&(*val->contents.result)) | 1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_SpendableOutputDescriptorDecodeErrorZ *val = (LDKCResult_SpendableOutputDescriptorDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2444,41 +2705,49 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryShortChannel
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)arg)->result_ok;
+static inline LDKCVec_CVec_u8ZZ CVec_CVec_u8ZZ_clone(const LDKCVec_CVec_u8ZZ *orig) {
+       LDKCVec_CVec_u8ZZ ret = { .data = MALLOC(sizeof(LDKCVec_u8Z) * orig->datalen, "LDKCVec_CVec_u8ZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = CVec_u8Z_clone(&orig->data[i]);
+       }
+       return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CVec_CVec_u8ZZNoneZ*)arg)->result_ok;
+}
+ptrArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(uint32_t arg) {
+       LDKCResult_CVec_CVec_u8ZZNoneZ *val = (LDKCResult_CVec_CVec_u8ZZNoneZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKReplyShortChannelIdsEnd res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+       LDKCVec_CVec_u8ZZ res_var = (*val->contents.result);
+       ptrArray res_arr = init_arr(res_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
+       int8_tArray *res_arr_ptr = (int8_tArray*)(res_arr + 4);
+       for (size_t m = 0; m < res_var.datalen; m++) {
+               LDKCVec_u8Z res_conv_12_var = res_var.data[m];
+               int8_tArray res_conv_12_arr = init_arr(res_conv_12_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+               memcpy((uint8_t*)(res_conv_12_arr + 4), res_conv_12_var.data, res_conv_12_var.datalen);
+               res_arr_ptr[m] = res_conv_12_arr;
+       }
+       return res_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
+void  __attribute__((visibility("default"))) TS_LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(uint32_t arg) {
+       LDKCResult_CVec_CVec_u8ZZNoneZ *val = (LDKCResult_CVec_CVec_u8ZZNoneZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+       return *val->contents.err;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_QueryChannelRangeDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_InMemorySignerDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_InMemorySignerDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InMemorySignerDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_InMemorySignerDecodeErrorZ *val = (LDKCResult_InMemorySignerDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKQueryChannelRange res_var = (*val->contents.result);
+       LDKInMemorySigner res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InMemorySignerDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_InMemorySignerDecodeErrorZ *val = (LDKCResult_InMemorySignerDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2486,41 +2755,93 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRange
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_ReplyChannelRangeDecodeErrorZ*)arg)->result_ok;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_TxOutZ_new(uint32_tArray elems) {
+       LDKCVec_TxOutZ *ret = MALLOC(sizeof(LDKCVec_TxOutZ), "LDKCVec_TxOutZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKTxOut) * ret->datalen, "LDKCVec_TxOutZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKTxOut arr_elem_conv = *(LDKTxOut*)(((uint64_t)arr_elem) & ~1);
+                       FREE((void*)arr_elem);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
+       return (long)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
+static inline LDKCVec_TxOutZ CVec_TxOutZ_clone(const LDKCVec_TxOutZ *orig) {
+       LDKCVec_TxOutZ ret = { .data = MALLOC(sizeof(LDKTxOut) * orig->datalen, "LDKCVec_TxOutZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = TxOut_clone(&orig->data[i]);
+       }
+       return ret;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TransactionNoneZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_TransactionNoneZ*)arg)->result_ok;
+}
+int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_TransactionNoneZ_get_ok(uint32_t arg) {
+       LDKCResult_TransactionNoneZ *val = (LDKCResult_TransactionNoneZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKReplyChannelRange res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+       LDKTransaction res_var = (*val->contents.result);
+       int8_tArray res_arr = init_arr(res_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(res_arr + 4), res_var.data, res_var.datalen);
+       return res_arr;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
+void  __attribute__((visibility("default"))) TS_LDKCResult_TransactionNoneZ_get_err(uint32_t arg) {
+       LDKCResult_TransactionNoneZ *val = (LDKCResult_TransactionNoneZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+       return *val->contents.err;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_GossipTimestampFilterDecodeErrorZ*)arg)->result_ok;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_RouteHopZ_new(uint32_tArray elems) {
+       LDKCVec_RouteHopZ *ret = MALLOC(sizeof(LDKCVec_RouteHopZ), "LDKCVec_RouteHopZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKRouteHop) * ret->datalen, "LDKCVec_RouteHopZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKRouteHop arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = RouteHop_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
+       return (long)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
+static inline LDKCVec_RouteHopZ CVec_RouteHopZ_clone(const LDKCVec_RouteHopZ *orig) {
+       LDKCVec_RouteHopZ ret = { .data = MALLOC(sizeof(LDKRouteHop) * orig->datalen, "LDKCVec_RouteHopZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = RouteHop_clone(&orig->data[i]);
+       }
+       return ret;
+}
+static inline LDKCVec_CVec_RouteHopZZ CVec_CVec_RouteHopZZ_clone(const LDKCVec_CVec_RouteHopZZ *orig) {
+       LDKCVec_CVec_RouteHopZZ ret = { .data = MALLOC(sizeof(LDKCVec_RouteHopZ) * orig->datalen, "LDKCVec_CVec_RouteHopZZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = CVec_RouteHopZ_clone(&orig->data[i]);
+       }
+       return ret;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_RouteDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKGossipTimestampFilter res_var = (*val->contents.result);
+       LDKRoute res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2528,263 +2849,226 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFi
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_CVec_u8ZPeerHandleErrorZ*)arg)->result_ok;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKCVec_u8Z res_var = (*val->contents.result);
-       int8_tArray res_arr = init_arr(res_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(res_arr + 4), res_var.data, res_var.datalen);
-       return res_arr;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(uint32_t arg) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ *val = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NonePeerHandleErrorZ*)arg)->result_ok;
-}
-void  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NonePeerHandleErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NonePeerHandleErrorZ *val = (LDKCResult_NonePeerHandleErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_boolPeerHandleErrorZ*)arg)->result_ok;
-}
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       return *val->contents.result;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_boolPeerHandleErrorZ_get_err(uint32_t arg) {
-       LDKCResult_boolPeerHandleErrorZ *val = (LDKCResult_boolPeerHandleErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKPeerHandleError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
-}
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeySecpErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_SecretKeySecpErrorZ*)arg)->result_ok;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeySecpErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_SecretKeySecpErrorZ *val = (LDKCResult_SecretKeySecpErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       int8_tArray res_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(res_arr + 4), (*val->contents.result).bytes, 32);
-       return res_arr;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_SecretKeySecpErrorZ_get_err(uint32_t arg) {
-       LDKCResult_SecretKeySecpErrorZ *val = (LDKCResult_SecretKeySecpErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
-       return err_conv;
-}
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeySecpErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_PublicKeySecpErrorZ*)arg)->result_ok;
-}
-int8_tArray  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeySecpErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_PublicKeySecpErrorZ *val = (LDKCResult_PublicKeySecpErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       int8_tArray res_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(res_arr + 4), (*val->contents.result).compressed_form, 33);
-       return res_arr;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_RouteHintZ_new(uint32_tArray elems) {
+       LDKCVec_RouteHintZ *ret = MALLOC(sizeof(LDKCVec_RouteHintZ), "LDKCVec_RouteHintZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKRouteHint) * ret->datalen, "LDKCVec_RouteHintZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKRouteHint arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = RouteHint_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
+       return (long)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PublicKeySecpErrorZ_get_err(uint32_t arg) {
-       LDKCResult_PublicKeySecpErrorZ *val = (LDKCResult_PublicKeySecpErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
-       return err_conv;
+static inline LDKCVec_RouteHintZ CVec_RouteHintZ_clone(const LDKCVec_RouteHintZ *orig) {
+       LDKCVec_RouteHintZ ret = { .data = MALLOC(sizeof(LDKRouteHint) * orig->datalen, "LDKCVec_RouteHintZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = RouteHint_clone(&orig->data[i]);
+       }
+       return ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysSecpErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_TxCreationKeysSecpErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_RouteLightningErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysSecpErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_TxCreationKeysSecpErrorZ *val = (LDKCResult_TxCreationKeysSecpErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKTxCreationKeys res_var = (*val->contents.result);
+       LDKRoute res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TxCreationKeysSecpErrorZ_get_err(uint32_t arg) {
-       LDKCResult_TxCreationKeysSecpErrorZ *val = (LDKCResult_TxCreationKeysSecpErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_get_err(uint32_t arg) {
+       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       uint32_t err_conv = LDKSecp256k1Error_to_js((*val->contents.err));
-       return err_conv;
+       LDKLightningError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_TrustedCommitmentTransactionNoneZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NetAddressu8Z_result_ok(uint32_t arg) {
+       return ((LDKCResult_NetAddressu8Z*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(uint32_t arg) {
-       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetAddressu8Z_get_ok(uint32_t arg) {
+       LDKCResult_NetAddressu8Z *val = (LDKCResult_NetAddressu8Z*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKTrustedCommitmentTransaction res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
+       long res_ref = ((long)&(*val->contents.result)) | 1;
        return res_ref;
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(uint32_t arg) {
-       LDKCResult_TrustedCommitmentTransactionNoneZ *val = (LDKCResult_TrustedCommitmentTransactionNoneZ*)(arg & ~1);
+int8_t  __attribute__((visibility("default"))) TS_LDKCResult_NetAddressu8Z_get_err(uint32_t arg) {
+       LDKCResult_NetAddressu8Z *val = (LDKCResult_NetAddressu8Z*)(arg & ~1);
        CHECK(!val->result_ok);
        return *val->contents.err;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_CVec_SignatureZNoneZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)arg)->result_ok;
 }
-ptrArray  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_get_ok(uint32_t arg) {
-       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *val = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKCVec_SignatureZ res_var = (*val->contents.result);
-       ptrArray res_arr = init_arr(res_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
-       int8_tArray *res_arr_ptr = (int8_tArray*)(res_arr + 4);
-       for (size_t m = 0; m < res_var.datalen; m++) {
-               int8_tArray arr_conv_12_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-               memcpy((uint8_t*)(arr_conv_12_arr + 4), res_var.data[m].compact_form, 64);
-               res_arr_ptr[m] = arr_conv_12_arr;
-       }
-       return res_arr;
+       LDKCResult_NetAddressu8Z* res_conv = MALLOC(sizeof(LDKCResult_NetAddressu8Z), "LDKCResult_NetAddressu8Z");
+       *res_conv = (*val->contents.result);
+       *res_conv = CResult_NetAddressu8Z_clone(res_conv);
+       return (long)res_conv;
 }
-void  __attribute__((visibility("default"))) TS_LDKCResult_CVec_SignatureZNoneZ_get_err(uint32_t arg) {
-       LDKCResult_CVec_SignatureZNoneZ *val = (LDKCResult_CVec_SignatureZNoneZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *val = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       return *val->contents.err;
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_RouteHopZ_new(uint32_tArray elems) {
-       LDKCVec_RouteHopZ *ret = MALLOC(sizeof(LDKCVec_RouteHopZ), "LDKCVec_RouteHopZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_UpdateAddHTLCZ_new(uint32_tArray elems) {
+       LDKCVec_UpdateAddHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateAddHTLCZ), "LDKCVec_UpdateAddHTLCZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKRouteHop) * ret->datalen, "LDKCVec_RouteHopZ Data");
+               ret->data = MALLOC(sizeof(LDKUpdateAddHTLC) * ret->datalen, "LDKCVec_UpdateAddHTLCZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKRouteHop arr_elem_conv;
+                       LDKUpdateAddHTLC arr_elem_conv;
                        arr_elem_conv.inner = (void*)(arr_elem & (~1));
                        arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = RouteHop_clone(&arr_elem_conv);
+                       arr_elem_conv = UpdateAddHTLC_clone(&arr_elem_conv);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_RouteHopZ CVec_RouteHopZ_clone(const LDKCVec_RouteHopZ *orig) {
-       LDKCVec_RouteHopZ ret = { .data = MALLOC(sizeof(LDKRouteHop) * orig->datalen, "LDKCVec_RouteHopZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_UpdateAddHTLCZ CVec_UpdateAddHTLCZ_clone(const LDKCVec_UpdateAddHTLCZ *orig) {
+       LDKCVec_UpdateAddHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateAddHTLC) * orig->datalen, "LDKCVec_UpdateAddHTLCZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = RouteHop_clone(&orig->data[i]);
+               ret.data[i] = UpdateAddHTLC_clone(&orig->data[i]);
        }
        return ret;
 }
-static inline LDKCVec_CVec_RouteHopZZ CVec_CVec_RouteHopZZ_clone(const LDKCVec_CVec_RouteHopZZ *orig) {
-       LDKCVec_CVec_RouteHopZZ ret = { .data = MALLOC(sizeof(LDKCVec_RouteHopZ) * orig->datalen, "LDKCVec_CVec_RouteHopZZ clone bytes"), .datalen = orig->datalen };
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_UpdateFulfillHTLCZ_new(uint32_tArray elems) {
+       LDKCVec_UpdateFulfillHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFulfillHTLCZ), "LDKCVec_UpdateFulfillHTLCZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKUpdateFulfillHTLC) * ret->datalen, "LDKCVec_UpdateFulfillHTLCZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKUpdateFulfillHTLC arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = UpdateFulfillHTLC_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
+       return (long)ret;
+}
+static inline LDKCVec_UpdateFulfillHTLCZ CVec_UpdateFulfillHTLCZ_clone(const LDKCVec_UpdateFulfillHTLCZ *orig) {
+       LDKCVec_UpdateFulfillHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFulfillHTLC) * orig->datalen, "LDKCVec_UpdateFulfillHTLCZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = CVec_RouteHopZ_clone(&orig->data[i]);
+               ret.data[i] = UpdateFulfillHTLC_clone(&orig->data[i]);
        }
        return ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_RouteDecodeErrorZ*)arg)->result_ok;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
-       CHECK(val->result_ok);
-       LDKRoute res_var = (*val->contents.result);
-       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long res_ref = (long)res_var.inner & ~1;
-       return res_ref;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_UpdateFailHTLCZ_new(uint32_tArray elems) {
+       LDKCVec_UpdateFailHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFailHTLCZ), "LDKCVec_UpdateFailHTLCZ");
+       ret->datalen = *((uint32_t*)elems);
+       if (ret->datalen == 0) {
+               ret->data = NULL;
+       } else {
+               ret->data = MALLOC(sizeof(LDKUpdateFailHTLC) * ret->datalen, "LDKCVec_UpdateFailHTLCZ Data");
+               uint32_t *java_elems = (uint32_t*)(elems + 4);
+               for (size_t i = 0; i < ret->datalen; i++) {
+                       uint32_t arr_elem = java_elems[i];
+                       LDKUpdateFailHTLC arr_elem_conv;
+                       arr_elem_conv.inner = (void*)(arr_elem & (~1));
+                       arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
+                       arr_elem_conv = UpdateFailHTLC_clone(&arr_elem_conv);
+                       ret->data[i] = arr_elem_conv;
+               }
+       }
+       return (long)ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_RouteDecodeErrorZ *val = (LDKCResult_RouteDecodeErrorZ*)(arg & ~1);
-       CHECK(!val->result_ok);
-       LDKDecodeError err_var = (*val->contents.err);
-       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long err_ref = (long)err_var.inner & ~1;
-       return err_ref;
+static inline LDKCVec_UpdateFailHTLCZ CVec_UpdateFailHTLCZ_clone(const LDKCVec_UpdateFailHTLCZ *orig) {
+       LDKCVec_UpdateFailHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFailHTLC) * orig->datalen, "LDKCVec_UpdateFailHTLCZ clone bytes"), .datalen = orig->datalen };
+       for (size_t i = 0; i < ret.datalen; i++) {
+               ret.data[i] = UpdateFailHTLC_clone(&orig->data[i]);
+       }
+       return ret;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_RouteHintZ_new(uint32_tArray elems) {
-       LDKCVec_RouteHintZ *ret = MALLOC(sizeof(LDKCVec_RouteHintZ), "LDKCVec_RouteHintZ");
+uint32_t  __attribute__((visibility("default"))) TS_LDKCVec_UpdateFailMalformedHTLCZ_new(uint32_tArray elems) {
+       LDKCVec_UpdateFailMalformedHTLCZ *ret = MALLOC(sizeof(LDKCVec_UpdateFailMalformedHTLCZ), "LDKCVec_UpdateFailMalformedHTLCZ");
        ret->datalen = *((uint32_t*)elems);
        if (ret->datalen == 0) {
                ret->data = NULL;
        } else {
-               ret->data = MALLOC(sizeof(LDKRouteHint) * ret->datalen, "LDKCVec_RouteHintZ Data");
+               ret->data = MALLOC(sizeof(LDKUpdateFailMalformedHTLC) * ret->datalen, "LDKCVec_UpdateFailMalformedHTLCZ Data");
                uint32_t *java_elems = (uint32_t*)(elems + 4);
                for (size_t i = 0; i < ret->datalen; i++) {
                        uint32_t arr_elem = java_elems[i];
-                       LDKRouteHint arr_elem_conv;
+                       LDKUpdateFailMalformedHTLC arr_elem_conv;
                        arr_elem_conv.inner = (void*)(arr_elem & (~1));
                        arr_elem_conv.is_owned = (arr_elem & 1) || (arr_elem == 0);
-                       arr_elem_conv = RouteHint_clone(&arr_elem_conv);
+                       arr_elem_conv = UpdateFailMalformedHTLC_clone(&arr_elem_conv);
                        ret->data[i] = arr_elem_conv;
                }
        }
        return (long)ret;
 }
-static inline LDKCVec_RouteHintZ CVec_RouteHintZ_clone(const LDKCVec_RouteHintZ *orig) {
-       LDKCVec_RouteHintZ ret = { .data = MALLOC(sizeof(LDKRouteHint) * orig->datalen, "LDKCVec_RouteHintZ clone bytes"), .datalen = orig->datalen };
+static inline LDKCVec_UpdateFailMalformedHTLCZ CVec_UpdateFailMalformedHTLCZ_clone(const LDKCVec_UpdateFailMalformedHTLCZ *orig) {
+       LDKCVec_UpdateFailMalformedHTLCZ ret = { .data = MALLOC(sizeof(LDKUpdateFailMalformedHTLC) * orig->datalen, "LDKCVec_UpdateFailMalformedHTLCZ clone bytes"), .datalen = orig->datalen };
        for (size_t i = 0; i < ret.datalen; i++) {
-               ret.data[i] = RouteHint_clone(&orig->data[i]);
+               ret.data[i] = UpdateFailMalformedHTLC_clone(&orig->data[i]);
        }
        return ret;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_RouteLightningErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_AcceptChannelDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_AcceptChannelDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_AcceptChannelDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_AcceptChannelDecodeErrorZ *val = (LDKCResult_AcceptChannelDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKRoute res_var = (*val->contents.result);
+       LDKAcceptChannel res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RouteLightningErrorZ_get_err(uint32_t arg) {
-       LDKCResult_RouteLightningErrorZ *val = (LDKCResult_RouteLightningErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_AcceptChannelDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_AcceptChannelDecodeErrorZ *val = (LDKCResult_AcceptChannelDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
-       LDKLightningError err_var = (*val->contents.err);
+       LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_RoutingFeesDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_AnnouncementSignaturesDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ *val = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKRoutingFees res_var = (*val->contents.result);
+       LDKAnnouncementSignatures res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_RoutingFeesDecodeErrorZ *val = (LDKCResult_RoutingFeesDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ *val = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2792,20 +3076,20 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RoutingFeesDecode
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)arg)->result_ok;
-}
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelReestablishDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKNodeAnnouncementInfo res_var = (*val->contents.result);
+       LDKChannelReestablish res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ *val = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelReestablishDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelReestablishDecodeErrorZ *val = (LDKCResult_ChannelReestablishDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2813,20 +3097,20 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementI
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NodeInfoDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ClosingSignedDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ClosingSignedDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ClosingSignedDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ClosingSignedDecodeErrorZ *val = (LDKCResult_ClosingSignedDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKNodeInfo res_var = (*val->contents.result);
+       LDKClosingSigned res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NodeInfoDecodeErrorZ *val = (LDKCResult_NodeInfoDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ClosingSignedDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ClosingSignedDecodeErrorZ *val = (LDKCResult_ClosingSignedDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2834,20 +3118,20 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeInfoDecodeErr
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_result_ok(uint32_t arg) {
-       return ((LDKCResult_NetworkGraphDecodeErrorZ*)arg)->result_ok;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_CommitmentSignedDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_get_ok(uint32_t arg) {
-       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_CommitmentSignedDecodeErrorZ *val = (LDKCResult_CommitmentSignedDecodeErrorZ*)(arg & ~1);
        CHECK(val->result_ok);
-       LDKNetworkGraph res_var = (*val->contents.result);
+       LDKCommitmentSigned res_var = (*val->contents.result);
        CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long res_ref = (long)res_var.inner & ~1;
        return res_ref;
 }
-uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecodeErrorZ_get_err(uint32_t arg) {
-       LDKCResult_NetworkGraphDecodeErrorZ *val = (LDKCResult_NetworkGraphDecodeErrorZ*)(arg & ~1);
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_CommitmentSignedDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_CommitmentSignedDecodeErrorZ *val = (LDKCResult_CommitmentSignedDecodeErrorZ*)(arg & ~1);
        CHECK(!val->result_ok);
        LDKDecodeError err_var = (*val->contents.err);
        CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -2855,215 +3139,827 @@ uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NetworkGraphDecod
        long err_ref = (long)err_var.inner & ~1;
        return err_ref;
 }
-typedef struct LDKMessageSendEventsProvider_JCalls {
-       atomic_size_t refcnt;
-       uint32_t get_and_clear_pending_msg_events_meth;
-} LDKMessageSendEventsProvider_JCalls;
-static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->get_and_clear_pending_msg_events_meth);
-               FREE(j_calls);
-       }
-}
-LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       uint32_tArray arg = js_invoke_function_0(j_calls->get_and_clear_pending_msg_events_meth);
-       LDKCVec_MessageSendEventZ arg_constr;
-       arg_constr.datalen = *((uint32_t*)arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
-       else
-               arg_constr.data = NULL;
-       uint32_t* arg_vals = (uint32_t*)(arg + 4);
-       for (size_t s = 0; s < arg_constr.datalen; s++) {
-               uint32_t arr_conv_18 = arg_vals[s];
-               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
-               FREE((void*)arr_conv_18);
-               arg_constr.data[s] = arr_conv_18_conv;
-       }
-       return arg_constr;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_FundingCreatedDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_FundingCreatedDecodeErrorZ*)arg)->result_ok;
 }
-static void* LDKMessageSendEventsProvider_JCalls_clone(const void* this_arg) {
-       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingCreatedDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_FundingCreatedDecodeErrorZ *val = (LDKCResult_FundingCreatedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKFundingCreated res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-static inline LDKMessageSendEventsProvider LDKMessageSendEventsProvider_init (/*TODO: JS Object Reference */void* o) {
-       LDKMessageSendEventsProvider_JCalls *calls = MALLOC(sizeof(LDKMessageSendEventsProvider_JCalls), "LDKMessageSendEventsProvider_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
-
-       LDKMessageSendEventsProvider ret = {
-               .this_arg = (void*) calls,
-               .get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall,
-               .free = LDKMessageSendEventsProvider_JCalls_free,
-       };
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingCreatedDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_FundingCreatedDecodeErrorZ *val = (LDKCResult_FundingCreatedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-long  __attribute__((visibility("default"))) TS_LDKMessageSendEventsProvider_new(/*TODO: JS Object Reference */void* o) {
-       LDKMessageSendEventsProvider *res_ptr = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
-       *res_ptr = LDKMessageSendEventsProvider_init(o);
-       return (long)res_ptr;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_FundingSignedDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_FundingSignedDecodeErrorZ*)arg)->result_ok;
 }
-uint32_tArray  __attribute__((visibility("default"))) TS_MessageSendEventsProvider_get_and_clear_pending_msg_events(uint32_t this_arg) {
-       LDKMessageSendEventsProvider* this_arg_conv = (LDKMessageSendEventsProvider*)this_arg;
-       LDKCVec_MessageSendEventZ ret_var = (this_arg_conv->get_and_clear_pending_msg_events)(this_arg_conv->this_arg);
-       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
-       for (size_t s = 0; s < ret_var.datalen; s++) {
-               LDKMessageSendEvent *arr_conv_18_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
-               *arr_conv_18_copy = MessageSendEvent_clone(&ret_var.data[s]);
-               long arr_conv_18_ref = (long)arr_conv_18_copy;
-               ret_arr_ptr[s] = arr_conv_18_ref;
-       }
-       FREE(ret_var.data);
-       return ret_arr;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingSignedDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_FundingSignedDecodeErrorZ *val = (LDKCResult_FundingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKFundingSigned res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-
-typedef struct LDKEventsProvider_JCalls {
-       atomic_size_t refcnt;
-       uint32_t get_and_clear_pending_events_meth;
-} LDKEventsProvider_JCalls;
-static void LDKEventsProvider_JCalls_free(void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->get_and_clear_pending_events_meth);
-               FREE(j_calls);
-       }
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingSignedDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_FundingSignedDecodeErrorZ *val = (LDKCResult_FundingSignedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
-       uint32_tArray arg = js_invoke_function_0(j_calls->get_and_clear_pending_events_meth);
-       LDKCVec_EventZ arg_constr;
-       arg_constr.datalen = *((uint32_t*)arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
-       else
-               arg_constr.data = NULL;
-       uint32_t* arg_vals = (uint32_t*)(arg + 4);
-       for (size_t h = 0; h < arg_constr.datalen; h++) {
-               uint32_t arr_conv_7 = arg_vals[h];
-               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
-               FREE((void*)arr_conv_7);
-               arg_constr.data[h] = arr_conv_7_conv;
-       }
-       return arg_constr;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_FundingLockedDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_FundingLockedDecodeErrorZ*)arg)->result_ok;
 }
-static void* LDKEventsProvider_JCalls_clone(const void* this_arg) {
-       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingLockedDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_FundingLockedDecodeErrorZ *val = (LDKCResult_FundingLockedDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKFundingLocked res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-static inline LDKEventsProvider LDKEventsProvider_init (/*TODO: JS Object Reference */void* o) {
-       LDKEventsProvider_JCalls *calls = MALLOC(sizeof(LDKEventsProvider_JCalls), "LDKEventsProvider_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
-
-       LDKEventsProvider ret = {
-               .this_arg = (void*) calls,
-               .get_and_clear_pending_events = get_and_clear_pending_events_jcall,
-               .free = LDKEventsProvider_JCalls_free,
-       };
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_FundingLockedDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_FundingLockedDecodeErrorZ *val = (LDKCResult_FundingLockedDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-long  __attribute__((visibility("default"))) TS_LDKEventsProvider_new(/*TODO: JS Object Reference */void* o) {
-       LDKEventsProvider *res_ptr = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
-       *res_ptr = LDKEventsProvider_init(o);
-       return (long)res_ptr;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_InitDecodeErrorZ*)arg)->result_ok;
 }
-uint32_tArray  __attribute__((visibility("default"))) TS_EventsProvider_get_and_clear_pending_events(uint32_t this_arg) {
-       LDKEventsProvider* this_arg_conv = (LDKEventsProvider*)this_arg;
-       LDKCVec_EventZ ret_var = (this_arg_conv->get_and_clear_pending_events)(this_arg_conv->this_arg);
-       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
-       for (size_t h = 0; h < ret_var.datalen; h++) {
-               LDKEvent *arr_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-               *arr_conv_7_copy = Event_clone(&ret_var.data[h]);
-               long arr_conv_7_ref = (long)arr_conv_7_copy;
-               ret_arr_ptr[h] = arr_conv_7_ref;
-       }
-       FREE(ret_var.data);
-       return ret_arr;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKInit res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-
-typedef struct LDKAccess_JCalls {
-       atomic_size_t refcnt;
-       uint32_t get_utxo_meth;
-} LDKAccess_JCalls;
-static void LDKAccess_JCalls_free(void* this_arg) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->get_utxo_meth);
-               FREE(j_calls);
-       }
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_InitDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_InitDecodeErrorZ *val = (LDKCResult_InitDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-LDKCResult_TxOutAccessErrorZ get_utxo_jcall(const void* this_arg, const uint8_t (* genesis_hash)[32], uint64_t short_channel_id) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
-       int8_tArray genesis_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(genesis_hash_arr + 4), *genesis_hash, 32);
-       LDKCResult_TxOutAccessErrorZ* ret = (LDKCResult_TxOutAccessErrorZ*)js_invoke_function_2(j_calls->get_utxo_meth, genesis_hash_arr, short_channel_id);
-       LDKCResult_TxOutAccessErrorZ ret_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_TxOutAccessErrorZ_clone((LDKCResult_TxOutAccessErrorZ*)ret);
-       return ret_conv;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_OpenChannelDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_OpenChannelDecodeErrorZ*)arg)->result_ok;
 }
-static void* LDKAccess_JCalls_clone(const void* this_arg) {
-       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_OpenChannelDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_OpenChannelDecodeErrorZ *val = (LDKCResult_OpenChannelDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKOpenChannel res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-static inline LDKAccess LDKAccess_init (/*TODO: JS Object Reference */void* o) {
-       LDKAccess_JCalls *calls = MALLOC(sizeof(LDKAccess_JCalls), "LDKAccess_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
-
-       LDKAccess ret = {
-               .this_arg = (void*) calls,
-               .get_utxo = get_utxo_jcall,
-               .free = LDKAccess_JCalls_free,
-       };
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_OpenChannelDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_OpenChannelDecodeErrorZ *val = (LDKCResult_OpenChannelDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-long  __attribute__((visibility("default"))) TS_LDKAccess_new(/*TODO: JS Object Reference */void* o) {
-       LDKAccess *res_ptr = MALLOC(sizeof(LDKAccess), "LDKAccess");
-       *res_ptr = LDKAccess_init(o);
-       return (long)res_ptr;
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_RevokeAndACKDecodeErrorZ*)arg)->result_ok;
 }
-uint32_t  __attribute__((visibility("default"))) TS_Access_get_utxo(uint32_t this_arg, int8_tArray genesis_hash, int64_t short_channel_id) {
-       LDKAccess* this_arg_conv = (LDKAccess*)this_arg;
-       unsigned char genesis_hash_arr[32];
-       CHECK(*((uint32_t*)genesis_hash) == 32);
-       memcpy(genesis_hash_arr, (uint8_t*)(genesis_hash + 4), 32);
-       unsigned char (*genesis_hash_ref)[32] = &genesis_hash_arr;
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = (this_arg_conv->get_utxo)(this_arg_conv->this_arg, genesis_hash_ref, short_channel_id);
-       return (long)ret_conv;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_RevokeAndACKDecodeErrorZ *val = (LDKCResult_RevokeAndACKDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKRevokeAndACK res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
 }
-
-typedef struct LDKFilter_JCalls {
-       atomic_size_t refcnt;
-       uint32_t register_tx_meth;
-       uint32_t register_output_meth;
-} LDKFilter_JCalls;
-static void LDKFilter_JCalls_free(void* this_arg) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->register_tx_meth);
-               js_free(j_calls->register_output_meth);
-               FREE(j_calls);
-       }
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_RevokeAndACKDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_RevokeAndACKDecodeErrorZ *val = (LDKCResult_RevokeAndACKDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
 }
-void register_tx_jcall(const void* this_arg, const uint8_t (* txid)[32], LDKu8slice script_pubkey) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
-       int8_tArray txid_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(txid_arr + 4), *txid, 32);
-       LDKu8slice script_pubkey_var = script_pubkey;
-       int8_tArray script_pubkey_arr = init_arr(script_pubkey_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
-       js_invoke_function_2(j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ShutdownDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ShutdownDecodeErrorZ*)arg)->result_ok;
 }
-void register_output_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ShutdownDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ShutdownDecodeErrorZ *val = (LDKCResult_ShutdownDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKShutdown res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ShutdownDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ShutdownDecodeErrorZ *val = (LDKCResult_ShutdownDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UpdateFailHTLCDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateFailHTLC res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateFailMalformedHTLC res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *val = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFeeDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UpdateFeeDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFeeDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UpdateFeeDecodeErrorZ *val = (LDKCResult_UpdateFeeDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateFee res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFeeDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UpdateFeeDecodeErrorZ *val = (LDKCResult_UpdateFeeDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ *val = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateFulfillHTLC res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ *val = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UpdateAddHTLCDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ *val = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUpdateAddHTLC res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ *val = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PingDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_PingDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PingDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKPing res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PingDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_PingDecodeErrorZ *val = (LDKCResult_PingDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_PongDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_PongDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PongDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKPong res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_PongDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_PongDecodeErrorZ *val = (LDKCResult_PongDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUnsignedChannelAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelAnnouncementDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ *val = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ *val = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUnsignedChannelUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ *val = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ChannelUpdateDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ChannelUpdateDecodeErrorZ *val = (LDKCResult_ChannelUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKChannelUpdate res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ChannelUpdateDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ChannelUpdateDecodeErrorZ *val = (LDKCResult_ChannelUpdateDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ErrorMessageDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ErrorMessageDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ErrorMessageDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKErrorMessage res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ErrorMessageDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ErrorMessageDecodeErrorZ *val = (LDKCResult_ErrorMessageDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKUnsignedNodeAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *val = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_NodeAnnouncementDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ *val = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKNodeAnnouncement res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ *val = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_QueryShortChannelIdsDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKQueryShortChannelIds res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ *val = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKReplyShortChannelIdsEnd res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *val = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_QueryChannelRangeDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKQueryChannelRange res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_QueryChannelRangeDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ *val = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_ReplyChannelRangeDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKReplyChannelRange res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_ReplyChannelRangeDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ *val = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+jboolean  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(uint32_t arg) {
+       return ((LDKCResult_GossipTimestampFilterDecodeErrorZ*)arg)->result_ok;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(uint32_t arg) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
+       CHECK(val->result_ok);
+       LDKGossipTimestampFilter res_var = (*val->contents.result);
+       CHECK((((long)res_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&res_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long res_ref = (long)res_var.inner & ~1;
+       return res_ref;
+}
+uint32_t  __attribute__((visibility("default"))) TS_LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(uint32_t arg) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ *val = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(arg & ~1);
+       CHECK(!val->result_ok);
+       LDKDecodeError err_var = (*val->contents.err);
+       CHECK((((long)err_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&err_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long err_ref = (long)err_var.inner & ~1;
+       return err_ref;
+}
+typedef struct LDKMessageSendEventsProvider_JCalls {
+       atomic_size_t refcnt;
+       uint32_t get_and_clear_pending_msg_events_meth;
+} LDKMessageSendEventsProvider_JCalls;
+static void LDKMessageSendEventsProvider_JCalls_free(void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->get_and_clear_pending_msg_events_meth);
+               FREE(j_calls);
+       }
+}
+LDKCVec_MessageSendEventZ get_and_clear_pending_msg_events_jcall(const void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       uint32_tArray ret = js_invoke_function_0(j_calls->get_and_clear_pending_msg_events_meth);
+       LDKCVec_MessageSendEventZ ret_constr;
+       ret_constr.datalen = *((uint32_t*)ret);
+       if (ret_constr.datalen > 0)
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+       else
+               ret_constr.data = NULL;
+       uint32_t* ret_vals = (uint32_t*)(ret + 4);
+       for (size_t s = 0; s < ret_constr.datalen; s++) {
+               uint32_t ret_conv_18 = ret_vals[s];
+               LDKMessageSendEvent ret_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)ret_conv_18) & ~1);
+               ret_conv_18_conv = MessageSendEvent_clone((LDKMessageSendEvent*)ret_conv_18);
+               ret_constr.data[s] = ret_conv_18_conv;
+       }
+       return ret_constr;
+}
+static void* LDKMessageSendEventsProvider_JCalls_clone(const void* this_arg) {
+       LDKMessageSendEventsProvider_JCalls *j_calls = (LDKMessageSendEventsProvider_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKMessageSendEventsProvider LDKMessageSendEventsProvider_init (/*TODO: JS Object Reference */void* o) {
+       LDKMessageSendEventsProvider_JCalls *calls = MALLOC(sizeof(LDKMessageSendEventsProvider_JCalls), "LDKMessageSendEventsProvider_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKMessageSendEventsProvider ret = {
+               .this_arg = (void*) calls,
+               .get_and_clear_pending_msg_events = get_and_clear_pending_msg_events_jcall,
+               .free = LDKMessageSendEventsProvider_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKMessageSendEventsProvider_new(/*TODO: JS Object Reference */void* o) {
+       LDKMessageSendEventsProvider *res_ptr = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
+       *res_ptr = LDKMessageSendEventsProvider_init(o);
+       return (long)res_ptr;
+}
+uint32_tArray  __attribute__((visibility("default"))) TS_MessageSendEventsProvider_get_and_clear_pending_msg_events(uint32_t this_arg) {
+       LDKMessageSendEventsProvider* this_arg_conv = (LDKMessageSendEventsProvider*)this_arg;
+       LDKCVec_MessageSendEventZ ret_var = (this_arg_conv->get_and_clear_pending_msg_events)(this_arg_conv->this_arg);
+       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+       for (size_t s = 0; s < ret_var.datalen; s++) {
+               LDKMessageSendEvent *ret_conv_18_copy = MALLOC(sizeof(LDKMessageSendEvent), "LDKMessageSendEvent");
+               *ret_conv_18_copy = MessageSendEvent_clone(&ret_var.data[s]);
+               long ret_conv_18_ref = (long)ret_conv_18_copy;
+               ret_arr_ptr[s] = ret_conv_18_ref;
+       }
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+typedef struct LDKEventsProvider_JCalls {
+       atomic_size_t refcnt;
+       uint32_t get_and_clear_pending_events_meth;
+} LDKEventsProvider_JCalls;
+static void LDKEventsProvider_JCalls_free(void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->get_and_clear_pending_events_meth);
+               FREE(j_calls);
+       }
+}
+LDKCVec_EventZ get_and_clear_pending_events_jcall(const void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       uint32_tArray ret = js_invoke_function_0(j_calls->get_and_clear_pending_events_meth);
+       LDKCVec_EventZ ret_constr;
+       ret_constr.datalen = *((uint32_t*)ret);
+       if (ret_constr.datalen > 0)
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+       else
+               ret_constr.data = NULL;
+       uint32_t* ret_vals = (uint32_t*)(ret + 4);
+       for (size_t h = 0; h < ret_constr.datalen; h++) {
+               uint32_t ret_conv_7 = ret_vals[h];
+               LDKEvent ret_conv_7_conv = *(LDKEvent*)(((uint64_t)ret_conv_7) & ~1);
+               ret_conv_7_conv = Event_clone((LDKEvent*)ret_conv_7);
+               ret_constr.data[h] = ret_conv_7_conv;
+       }
+       return ret_constr;
+}
+static void* LDKEventsProvider_JCalls_clone(const void* this_arg) {
+       LDKEventsProvider_JCalls *j_calls = (LDKEventsProvider_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKEventsProvider LDKEventsProvider_init (/*TODO: JS Object Reference */void* o) {
+       LDKEventsProvider_JCalls *calls = MALLOC(sizeof(LDKEventsProvider_JCalls), "LDKEventsProvider_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKEventsProvider ret = {
+               .this_arg = (void*) calls,
+               .get_and_clear_pending_events = get_and_clear_pending_events_jcall,
+               .free = LDKEventsProvider_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKEventsProvider_new(/*TODO: JS Object Reference */void* o) {
+       LDKEventsProvider *res_ptr = MALLOC(sizeof(LDKEventsProvider), "LDKEventsProvider");
+       *res_ptr = LDKEventsProvider_init(o);
+       return (long)res_ptr;
+}
+uint32_tArray  __attribute__((visibility("default"))) TS_EventsProvider_get_and_clear_pending_events(uint32_t this_arg) {
+       LDKEventsProvider* this_arg_conv = (LDKEventsProvider*)this_arg;
+       LDKCVec_EventZ ret_var = (this_arg_conv->get_and_clear_pending_events)(this_arg_conv->this_arg);
+       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+       for (size_t h = 0; h < ret_var.datalen; h++) {
+               LDKEvent *ret_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
+               *ret_conv_7_copy = Event_clone(&ret_var.data[h]);
+               long ret_conv_7_ref = (long)ret_conv_7_copy;
+               ret_arr_ptr[h] = ret_conv_7_ref;
+       }
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+typedef struct LDKAccess_JCalls {
+       atomic_size_t refcnt;
+       uint32_t get_utxo_meth;
+} LDKAccess_JCalls;
+static void LDKAccess_JCalls_free(void* this_arg) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->get_utxo_meth);
+               FREE(j_calls);
+       }
+}
+LDKCResult_TxOutAccessErrorZ get_utxo_jcall(const void* this_arg, const uint8_t (* genesis_hash)[32], uint64_t short_channel_id) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+       int8_tArray genesis_hash_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(genesis_hash_arr + 4), *genesis_hash, 32);
+       LDKCResult_TxOutAccessErrorZ* ret = (LDKCResult_TxOutAccessErrorZ*)js_invoke_function_2(j_calls->get_utxo_meth, genesis_hash_arr, short_channel_id);
+       LDKCResult_TxOutAccessErrorZ ret_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_TxOutAccessErrorZ_clone((LDKCResult_TxOutAccessErrorZ*)ret);
+       return ret_conv;
+}
+static void* LDKAccess_JCalls_clone(const void* this_arg) {
+       LDKAccess_JCalls *j_calls = (LDKAccess_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKAccess LDKAccess_init (/*TODO: JS Object Reference */void* o) {
+       LDKAccess_JCalls *calls = MALLOC(sizeof(LDKAccess_JCalls), "LDKAccess_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKAccess ret = {
+               .this_arg = (void*) calls,
+               .get_utxo = get_utxo_jcall,
+               .free = LDKAccess_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKAccess_new(/*TODO: JS Object Reference */void* o) {
+       LDKAccess *res_ptr = MALLOC(sizeof(LDKAccess), "LDKAccess");
+       *res_ptr = LDKAccess_init(o);
+       return (long)res_ptr;
+}
+uint32_t  __attribute__((visibility("default"))) TS_Access_get_utxo(uint32_t this_arg, int8_tArray genesis_hash, int64_t short_channel_id) {
+       LDKAccess* this_arg_conv = (LDKAccess*)this_arg;
+       unsigned char genesis_hash_arr[32];
+       CHECK(*((uint32_t*)genesis_hash) == 32);
+       memcpy(genesis_hash_arr, (uint8_t*)(genesis_hash + 4), 32);
+       unsigned char (*genesis_hash_ref)[32] = &genesis_hash_arr;
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = (this_arg_conv->get_utxo)(this_arg_conv->this_arg, genesis_hash_ref, short_channel_id);
+       return (long)ret_conv;
+}
+
+typedef struct LDKListen_JCalls {
+       atomic_size_t refcnt;
+       uint32_t block_connected_meth;
+       uint32_t block_disconnected_meth;
+} LDKListen_JCalls;
+static void LDKListen_JCalls_free(void* this_arg) {
+       LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->block_connected_meth);
+               js_free(j_calls->block_disconnected_meth);
+               FREE(j_calls);
+       }
+}
+void block_connected_jcall(const void* this_arg, LDKu8slice block, uint32_t height) {
+       LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
+       LDKu8slice block_var = block;
+       int8_tArray block_arr = init_arr(block_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(block_arr + 4), block_var.data, block_var.datalen);
+       js_invoke_function_2(j_calls->block_connected_meth, block_arr, height);
+}
+void block_disconnected_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_arr(80, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(header_arr + 4), *header, 80);
+       js_invoke_function_2(j_calls->block_disconnected_meth, header_arr, height);
+}
+static void* LDKListen_JCalls_clone(const void* this_arg) {
+       LDKListen_JCalls *j_calls = (LDKListen_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKListen LDKListen_init (/*TODO: JS Object Reference */void* o) {
+       LDKListen_JCalls *calls = MALLOC(sizeof(LDKListen_JCalls), "LDKListen_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKListen ret = {
+               .this_arg = (void*) calls,
+               .block_connected = block_connected_jcall,
+               .block_disconnected = block_disconnected_jcall,
+               .free = LDKListen_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKListen_new(/*TODO: JS Object Reference */void* o) {
+       LDKListen *res_ptr = MALLOC(sizeof(LDKListen), "LDKListen");
+       *res_ptr = LDKListen_init(o);
+       return (long)res_ptr;
+}
+void  __attribute__((visibility("default"))) TS_Listen_block_connected(uint32_t this_arg, int8_tArray block, int32_t height) {
+       LDKListen* this_arg_conv = (LDKListen*)this_arg;
+       LDKu8slice block_ref;
+       block_ref.datalen = *((uint32_t*)block);
+       block_ref.data = (int8_t*)(block + 4);
+       (this_arg_conv->block_connected)(this_arg_conv->this_arg, block_ref, height);
+}
+
+void  __attribute__((visibility("default"))) TS_Listen_block_disconnected(uint32_t this_arg, int8_tArray header, int32_t height) {
+       LDKListen* this_arg_conv = (LDKListen*)this_arg;
+       unsigned char header_arr[80];
+       CHECK(*((uint32_t*)header) == 80);
+       memcpy(header_arr, (uint8_t*)(header + 4), 80);
+       unsigned char (*header_ref)[80] = &header_arr;
+       (this_arg_conv->block_disconnected)(this_arg_conv->this_arg, header_ref, height);
+}
+
+typedef struct LDKFilter_JCalls {
+       atomic_size_t refcnt;
+       uint32_t register_tx_meth;
+       uint32_t register_output_meth;
+} LDKFilter_JCalls;
+static void LDKFilter_JCalls_free(void* this_arg) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->register_tx_meth);
+               js_free(j_calls->register_output_meth);
+               FREE(j_calls);
+       }
+}
+void register_tx_jcall(const void* this_arg, const uint8_t (* txid)[32], LDKu8slice script_pubkey) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       int8_tArray txid_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(txid_arr + 4), *txid, 32);
+       LDKu8slice script_pubkey_var = script_pubkey;
+       int8_tArray script_pubkey_arr = init_arr(script_pubkey_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
+       js_invoke_function_2(j_calls->register_tx_meth, txid_arr, script_pubkey_arr);
+}
+void register_output_jcall(const void* this_arg, const LDKOutPoint * outpoint, LDKu8slice script_pubkey) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
        LDKOutPoint outpoint_var = *outpoint;
        outpoint_var = OutPoint_clone(outpoint);
        CHECK((((long)outpoint_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -3072,1290 +3968,2281 @@ void register_output_jcall(const void* this_arg, const LDKOutPoint * outpoint, L
        if (outpoint_var.is_owned) {
                outpoint_ref |= 1;
        }
-       LDKu8slice script_pubkey_var = script_pubkey;
-       int8_tArray script_pubkey_arr = init_arr(script_pubkey_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
-       js_invoke_function_2(j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
+       LDKu8slice script_pubkey_var = script_pubkey;
+       int8_tArray script_pubkey_arr = init_arr(script_pubkey_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(script_pubkey_arr + 4), script_pubkey_var.data, script_pubkey_var.datalen);
+       js_invoke_function_2(j_calls->register_output_meth, outpoint_ref, script_pubkey_arr);
+}
+static void* LDKFilter_JCalls_clone(const void* this_arg) {
+       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKFilter LDKFilter_init (/*TODO: JS Object Reference */void* o) {
+       LDKFilter_JCalls *calls = MALLOC(sizeof(LDKFilter_JCalls), "LDKFilter_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKFilter ret = {
+               .this_arg = (void*) calls,
+               .register_tx = register_tx_jcall,
+               .register_output = register_output_jcall,
+               .free = LDKFilter_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKFilter_new(/*TODO: JS Object Reference */void* o) {
+       LDKFilter *res_ptr = MALLOC(sizeof(LDKFilter), "LDKFilter");
+       *res_ptr = LDKFilter_init(o);
+       return (long)res_ptr;
+}
+void  __attribute__((visibility("default"))) TS_Filter_register_tx(uint32_t this_arg, int8_tArray txid, int8_tArray script_pubkey) {
+       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
+       unsigned char txid_arr[32];
+       CHECK(*((uint32_t*)txid) == 32);
+       memcpy(txid_arr, (uint8_t*)(txid + 4), 32);
+       unsigned char (*txid_ref)[32] = &txid_arr;
+       LDKu8slice script_pubkey_ref;
+       script_pubkey_ref.datalen = *((uint32_t*)script_pubkey);
+       script_pubkey_ref.data = (int8_t*)(script_pubkey + 4);
+       (this_arg_conv->register_tx)(this_arg_conv->this_arg, txid_ref, script_pubkey_ref);
+}
+
+void  __attribute__((visibility("default"))) TS_Filter_register_output(uint32_t this_arg, uint32_t outpoint, int8_tArray script_pubkey) {
+       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
+       LDKOutPoint outpoint_conv;
+       outpoint_conv.inner = (void*)(outpoint & (~1));
+       outpoint_conv.is_owned = false;
+       LDKu8slice script_pubkey_ref;
+       script_pubkey_ref.datalen = *((uint32_t*)script_pubkey);
+       script_pubkey_ref.data = (int8_t*)(script_pubkey + 4);
+       (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
+}
+
+typedef struct LDKPersist_JCalls {
+       atomic_size_t refcnt;
+       uint32_t persist_new_channel_meth;
+       uint32_t update_persisted_channel_meth;
+} 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) {
+               js_free(j_calls->persist_new_channel_meth);
+               js_free(j_calls->update_persisted_channel_meth);
+               FREE(j_calls);
+       }
+}
+LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitor * data) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       LDKOutPoint id_var = id;
+       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long id_ref = (long)id_var.inner;
+       if (id_var.is_owned) {
+               id_ref |= 1;
+       }
+       LDKChannelMonitor data_var = *data;
+       data_var = ChannelMonitor_clone(data);
+       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long data_ref = (long)data_var.inner;
+       if (data_var.is_owned) {
+               data_ref |= 1;
+       }
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_2(j_calls->persist_new_channel_meth, id_ref, data_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
+}
+LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       LDKOutPoint id_var = id;
+       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long id_ref = (long)id_var.inner;
+       if (id_var.is_owned) {
+               id_ref |= 1;
+       }
+       LDKChannelMonitorUpdate update_var = *update;
+       update_var = ChannelMonitorUpdate_clone(update);
+       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long update_ref = (long)update_var.inner;
+       if (update_var.is_owned) {
+               update_ref |= 1;
+       }
+       LDKChannelMonitor data_var = *data;
+       data_var = ChannelMonitor_clone(data);
+       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long data_ref = (long)data_var.inner;
+       if (data_var.is_owned) {
+               data_ref |= 1;
+       }
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_3(j_calls->update_persisted_channel_meth, id_ref, update_ref, data_ref);
+       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
+       return ret_conv;
+}
+static void* LDKPersist_JCalls_clone(const void* this_arg) {
+       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKPersist LDKPersist_init (/*TODO: JS Object Reference */void* o) {
+       LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKPersist ret = {
+               .this_arg = (void*) calls,
+               .persist_new_channel = persist_new_channel_jcall,
+               .update_persisted_channel = update_persisted_channel_jcall,
+               .free = LDKPersist_JCalls_free,
+       };
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKPersist_new(/*TODO: JS Object Reference */void* o) {
+       LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist");
+       *res_ptr = LDKPersist_init(o);
+       return (long)res_ptr;
+}
+uint32_t  __attribute__((visibility("default"))) TS_Persist_persist_new_channel(uint32_t this_arg, uint32_t id, uint32_t data) {
+       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
+       LDKOutPoint id_conv;
+       id_conv.inner = (void*)(id & (~1));
+       id_conv.is_owned = (id & 1) || (id == 0);
+       id_conv = OutPoint_clone(&id_conv);
+       LDKChannelMonitor data_conv;
+       data_conv.inner = (void*)(data & (~1));
+       data_conv.is_owned = false;
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, id_conv, &data_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_Persist_update_persisted_channel(uint32_t this_arg, uint32_t id, uint32_t update, uint32_t data) {
+       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
+       LDKOutPoint id_conv;
+       id_conv.inner = (void*)(id & (~1));
+       id_conv.is_owned = (id & 1) || (id == 0);
+       id_conv = OutPoint_clone(&id_conv);
+       LDKChannelMonitorUpdate update_conv;
+       update_conv.inner = (void*)(update & (~1));
+       update_conv.is_owned = false;
+       LDKChannelMonitor data_conv;
+       data_conv.inner = (void*)(data & (~1));
+       data_conv.is_owned = false;
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, id_conv, &update_conv, &data_conv);
+       return (long)ret_conv;
+}
+
+typedef struct LDKChannelMessageHandler_JCalls {
+       atomic_size_t refcnt;
+       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
+       uint32_t handle_open_channel_meth;
+       uint32_t handle_accept_channel_meth;
+       uint32_t handle_funding_created_meth;
+       uint32_t handle_funding_signed_meth;
+       uint32_t handle_funding_locked_meth;
+       uint32_t handle_shutdown_meth;
+       uint32_t handle_closing_signed_meth;
+       uint32_t handle_update_add_htlc_meth;
+       uint32_t handle_update_fulfill_htlc_meth;
+       uint32_t handle_update_fail_htlc_meth;
+       uint32_t handle_update_fail_malformed_htlc_meth;
+       uint32_t handle_commitment_signed_meth;
+       uint32_t handle_revoke_and_ack_meth;
+       uint32_t handle_update_fee_meth;
+       uint32_t handle_announcement_signatures_meth;
+       uint32_t peer_disconnected_meth;
+       uint32_t peer_connected_meth;
+       uint32_t handle_channel_reestablish_meth;
+       uint32_t handle_error_meth;
+} LDKChannelMessageHandler_JCalls;
+static void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->handle_open_channel_meth);
+               js_free(j_calls->handle_accept_channel_meth);
+               js_free(j_calls->handle_funding_created_meth);
+               js_free(j_calls->handle_funding_signed_meth);
+               js_free(j_calls->handle_funding_locked_meth);
+               js_free(j_calls->handle_shutdown_meth);
+               js_free(j_calls->handle_closing_signed_meth);
+               js_free(j_calls->handle_update_add_htlc_meth);
+               js_free(j_calls->handle_update_fulfill_htlc_meth);
+               js_free(j_calls->handle_update_fail_htlc_meth);
+               js_free(j_calls->handle_update_fail_malformed_htlc_meth);
+               js_free(j_calls->handle_commitment_signed_meth);
+               js_free(j_calls->handle_revoke_and_ack_meth);
+               js_free(j_calls->handle_update_fee_meth);
+               js_free(j_calls->handle_announcement_signatures_meth);
+               js_free(j_calls->peer_disconnected_meth);
+               js_free(j_calls->peer_connected_meth);
+               js_free(j_calls->handle_channel_reestablish_meth);
+               js_free(j_calls->handle_error_meth);
+               FREE(j_calls);
+       }
+}
+void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKInitFeatures their_features_var = their_features;
+       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long their_features_ref = (long)their_features_var.inner;
+       if (their_features_var.is_owned) {
+               their_features_ref |= 1;
+       }
+       LDKOpenChannel msg_var = *msg;
+       msg_var = OpenChannel_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_3(j_calls->handle_open_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+}
+void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKInitFeatures their_features_var = their_features;
+       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long their_features_ref = (long)their_features_var.inner;
+       if (their_features_var.is_owned) {
+               their_features_ref |= 1;
+       }
+       LDKAcceptChannel msg_var = *msg;
+       msg_var = AcceptChannel_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_3(j_calls->handle_accept_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+}
+void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKFundingCreated msg_var = *msg;
+       msg_var = FundingCreated_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_funding_created_meth, their_node_id_arr, msg_ref);
+}
+void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKFundingSigned msg_var = *msg;
+       msg_var = FundingSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_funding_signed_meth, their_node_id_arr, msg_ref);
+}
+void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKFundingLocked msg_var = *msg;
+       msg_var = FundingLocked_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_funding_locked_meth, their_node_id_arr, msg_ref);
+}
+void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInitFeatures * their_features, const LDKShutdown * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKInitFeatures their_features_var = *their_features;
+       their_features_var = InitFeatures_clone(their_features);
+       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long their_features_ref = (long)their_features_var.inner;
+       if (their_features_var.is_owned) {
+               their_features_ref |= 1;
+       }
+       LDKShutdown msg_var = *msg;
+       msg_var = Shutdown_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_3(j_calls->handle_shutdown_meth, their_node_id_arr, their_features_ref, msg_ref);
+}
+void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKClosingSigned msg_var = *msg;
+       msg_var = ClosingSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_closing_signed_meth, their_node_id_arr, msg_ref);
+}
+void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKUpdateAddHTLC msg_var = *msg;
+       msg_var = UpdateAddHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_update_add_htlc_meth, their_node_id_arr, msg_ref);
+}
+void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKUpdateFulfillHTLC msg_var = *msg;
+       msg_var = UpdateFulfillHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_update_fulfill_htlc_meth, their_node_id_arr, msg_ref);
+}
+void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKUpdateFailHTLC msg_var = *msg;
+       msg_var = UpdateFailHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_update_fail_htlc_meth, their_node_id_arr, msg_ref);
+}
+void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKUpdateFailMalformedHTLC msg_var = *msg;
+       msg_var = UpdateFailMalformedHTLC_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_update_fail_malformed_htlc_meth, their_node_id_arr, msg_ref);
+}
+void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKCommitmentSigned msg_var = *msg;
+       msg_var = CommitmentSigned_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_commitment_signed_meth, their_node_id_arr, msg_ref);
+}
+void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKRevokeAndACK msg_var = *msg;
+       msg_var = RevokeAndACK_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_revoke_and_ack_meth, their_node_id_arr, msg_ref);
+}
+void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKUpdateFee msg_var = *msg;
+       msg_var = UpdateFee_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_update_fee_meth, their_node_id_arr, msg_ref);
+}
+void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKAnnouncementSignatures msg_var = *msg;
+       msg_var = AnnouncementSignatures_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_announcement_signatures_meth, their_node_id_arr, msg_ref);
+}
+void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       js_invoke_function_2(j_calls->peer_disconnected_meth, their_node_id_arr, no_connection_possible);
+}
+void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKInit msg_var = *msg;
+       msg_var = Init_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
+}
+void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKChannelReestablish msg_var = *msg;
+       msg_var = ChannelReestablish_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_channel_reestablish_meth, their_node_id_arr, msg_ref);
+}
+void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKErrorMessage msg_var = *msg;
+       msg_var = ErrorMessage_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->handle_error_meth, their_node_id_arr, msg_ref);
+}
+static void* LDKChannelMessageHandler_JCalls_clone(const void* this_arg) {
+       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */void* MessageSendEventsProvider) {
+       LDKChannelMessageHandler_JCalls *calls = MALLOC(sizeof(LDKChannelMessageHandler_JCalls), "LDKChannelMessageHandler_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKChannelMessageHandler ret = {
+               .this_arg = (void*) calls,
+               .handle_open_channel = handle_open_channel_jcall,
+               .handle_accept_channel = handle_accept_channel_jcall,
+               .handle_funding_created = handle_funding_created_jcall,
+               .handle_funding_signed = handle_funding_signed_jcall,
+               .handle_funding_locked = handle_funding_locked_jcall,
+               .handle_shutdown = handle_shutdown_jcall,
+               .handle_closing_signed = handle_closing_signed_jcall,
+               .handle_update_add_htlc = handle_update_add_htlc_jcall,
+               .handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall,
+               .handle_update_fail_htlc = handle_update_fail_htlc_jcall,
+               .handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall,
+               .handle_commitment_signed = handle_commitment_signed_jcall,
+               .handle_revoke_and_ack = handle_revoke_and_ack_jcall,
+               .handle_update_fee = handle_update_fee_jcall,
+               .handle_announcement_signatures = handle_announcement_signatures_jcall,
+               .peer_disconnected = peer_disconnected_jcall,
+               .peer_connected = peer_connected_jcall,
+               .handle_channel_reestablish = handle_channel_reestablish_jcall,
+               .handle_error = handle_error_jcall,
+               .free = LDKChannelMessageHandler_JCalls_free,
+               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
+       };
+       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKChannelMessageHandler_new(/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */ void* MessageSendEventsProvider) {
+       LDKChannelMessageHandler *res_ptr = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
+       *res_ptr = LDKChannelMessageHandler_init(o, MessageSendEventsProvider);
+       return (long)res_ptr;
+}
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_open_channel(uint32_t this_arg, int8_tArray their_node_id, uint32_t their_features, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKInitFeatures their_features_conv;
+       their_features_conv.inner = (void*)(their_features & (~1));
+       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
+       their_features_conv = InitFeatures_clone(&their_features_conv);
+       LDKOpenChannel msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_open_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_accept_channel(uint32_t this_arg, int8_tArray their_node_id, uint32_t their_features, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKInitFeatures their_features_conv;
+       their_features_conv.inner = (void*)(their_features & (~1));
+       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
+       their_features_conv = InitFeatures_clone(&their_features_conv);
+       LDKAcceptChannel msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_accept_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_created(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKFundingCreated msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_created)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKFundingSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_locked(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKFundingLocked msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_funding_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_shutdown(uint32_t this_arg, int8_tArray their_node_id, uint32_t their_features, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKInitFeatures their_features_conv;
+       their_features_conv.inner = (void*)(their_features & (~1));
+       their_features_conv.is_owned = false;
+       LDKShutdown msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_shutdown)(this_arg_conv->this_arg, their_node_id_ref, &their_features_conv, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_closing_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKClosingSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_closing_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_add_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKUpdateAddHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_add_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fulfill_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKUpdateFulfillHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fulfill_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fail_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKUpdateFailHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fail_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fail_malformed_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKUpdateFailMalformedHTLC msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fail_malformed_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_commitment_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKCommitmentSigned msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_commitment_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_revoke_and_ack(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKRevokeAndACK msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_revoke_and_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fee(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKUpdateFee msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_update_fee)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_announcement_signatures(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKAnnouncementSignatures msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_announcement_signatures)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_peer_disconnected(uint32_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_peer_connected(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKInit msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_channel_reestablish(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKChannelReestablish msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_channel_reestablish)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_error(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKErrorMessage msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       (this_arg_conv->handle_error)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+}
+
+typedef struct LDKRoutingMessageHandler_JCalls {
+       atomic_size_t refcnt;
+       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
+       uint32_t handle_node_announcement_meth;
+       uint32_t handle_channel_announcement_meth;
+       uint32_t handle_channel_update_meth;
+       uint32_t handle_htlc_fail_channel_update_meth;
+       uint32_t get_next_channel_announcements_meth;
+       uint32_t get_next_node_announcements_meth;
+       uint32_t sync_routing_table_meth;
+       uint32_t handle_reply_channel_range_meth;
+       uint32_t handle_reply_short_channel_ids_end_meth;
+       uint32_t handle_query_channel_range_meth;
+       uint32_t handle_query_short_channel_ids_meth;
+} LDKRoutingMessageHandler_JCalls;
+static void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->handle_node_announcement_meth);
+               js_free(j_calls->handle_channel_announcement_meth);
+               js_free(j_calls->handle_channel_update_meth);
+               js_free(j_calls->handle_htlc_fail_channel_update_meth);
+               js_free(j_calls->get_next_channel_announcements_meth);
+               js_free(j_calls->get_next_node_announcements_meth);
+               js_free(j_calls->sync_routing_table_meth);
+               js_free(j_calls->handle_reply_channel_range_meth);
+               js_free(j_calls->handle_reply_short_channel_ids_end_meth);
+               js_free(j_calls->handle_query_channel_range_meth);
+               js_free(j_calls->handle_query_short_channel_ids_meth);
+               FREE(j_calls);
+       }
+}
+LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       LDKNodeAnnouncement msg_var = *msg;
+       msg_var = NodeAnnouncement_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_node_announcement_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
+}
+LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       LDKChannelAnnouncement msg_var = *msg;
+       msg_var = ChannelAnnouncement_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_channel_announcement_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
+}
+LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate * msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       LDKChannelUpdate msg_var = *msg;
+       msg_var = ChannelUpdate_clone(msg);
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_channel_update_meth, msg_ref);
+       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
+       return ret_conv;
+}
+void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate * update) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       long ret_update = (long)update;
+       js_invoke_function_1(j_calls->handle_htlc_fail_channel_update_meth, ret_update);
+}
+LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       uint32_tArray ret = js_invoke_function_2(j_calls->get_next_channel_announcements_meth, starting_point, batch_amount);
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_constr;
+       ret_constr.datalen = *((uint32_t*)ret);
+       if (ret_constr.datalen > 0)
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
+       else
+               ret_constr.data = NULL;
+       uint32_t* ret_vals = (uint32_t*)(ret + 4);
+       for (size_t l = 0; l < ret_constr.datalen; l++) {
+               uint32_t ret_conv_63 = ret_vals[l];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ ret_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)ret_conv_63) & ~1);
+               ret_conv_63_conv = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone((LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)ret_conv_63);
+               ret_constr.data[l] = ret_conv_63_conv;
+       }
+       return ret_constr;
+}
+LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray starting_point_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(starting_point_arr + 4), starting_point.compressed_form, 33);
+       uint32_tArray ret = js_invoke_function_2(j_calls->get_next_node_announcements_meth, starting_point_arr, batch_amount);
+       LDKCVec_NodeAnnouncementZ ret_constr;
+       ret_constr.datalen = *((uint32_t*)ret);
+       if (ret_constr.datalen > 0)
+               ret_constr.data = MALLOC(ret_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
+       else
+               ret_constr.data = NULL;
+       uint32_t* ret_vals = (uint32_t*)(ret + 4);
+       for (size_t s = 0; s < ret_constr.datalen; s++) {
+               uint32_t ret_conv_18 = ret_vals[s];
+               LDKNodeAnnouncement ret_conv_18_conv;
+               ret_conv_18_conv.inner = (void*)(ret_conv_18 & (~1));
+               ret_conv_18_conv.is_owned = (ret_conv_18 & 1) || (ret_conv_18 == 0);
+               ret_conv_18_conv = NodeAnnouncement_clone(&ret_conv_18_conv);
+               ret_constr.data[s] = ret_conv_18_conv;
+       }
+       return ret_constr;
+}
+void sync_routing_table_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKInit init_var = *init;
+       init_var = Init_clone(init);
+       CHECK((((long)init_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&init_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long init_ref = (long)init_var.inner;
+       if (init_var.is_owned) {
+               init_ref |= 1;
+       }
+       js_invoke_function_2(j_calls->sync_routing_table_meth, their_node_id_arr, init_ref);
+}
+LDKCResult_NoneLightningErrorZ handle_reply_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKReplyChannelRange msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_reply_channel_range_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
+}
+LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyShortChannelIdsEnd msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKReplyShortChannelIdsEnd msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_reply_short_channel_ids_end_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
+}
+LDKCResult_NoneLightningErrorZ handle_query_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryChannelRange msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKQueryChannelRange msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_query_channel_range_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
+}
+LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryShortChannelIds msg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
+       LDKQueryShortChannelIds msg_var = msg;
+       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long msg_ref = (long)msg_var.inner;
+       if (msg_var.is_owned) {
+               msg_ref |= 1;
+       }
+       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_query_short_channel_ids_meth, their_node_id_arr, msg_ref);
+       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
+       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
+       return ret_conv;
+}
+static void* LDKRoutingMessageHandler_JCalls_clone(const void* this_arg) {
+       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
+       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
+       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
+       return (void*) this_arg;
+}
+static inline LDKRoutingMessageHandler LDKRoutingMessageHandler_init (/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */void* MessageSendEventsProvider) {
+       LDKRoutingMessageHandler_JCalls *calls = MALLOC(sizeof(LDKRoutingMessageHandler_JCalls), "LDKRoutingMessageHandler_JCalls");
+       atomic_init(&calls->refcnt, 1);
+       //TODO: Assign calls->o from o
+
+       LDKRoutingMessageHandler ret = {
+               .this_arg = (void*) calls,
+               .handle_node_announcement = handle_node_announcement_jcall,
+               .handle_channel_announcement = handle_channel_announcement_jcall,
+               .handle_channel_update = handle_channel_update_jcall,
+               .handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall,
+               .get_next_channel_announcements = get_next_channel_announcements_jcall,
+               .get_next_node_announcements = get_next_node_announcements_jcall,
+               .sync_routing_table = sync_routing_table_jcall,
+               .handle_reply_channel_range = handle_reply_channel_range_jcall,
+               .handle_reply_short_channel_ids_end = handle_reply_short_channel_ids_end_jcall,
+               .handle_query_channel_range = handle_query_channel_range_jcall,
+               .handle_query_short_channel_ids = handle_query_short_channel_ids_jcall,
+               .free = LDKRoutingMessageHandler_JCalls_free,
+               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
+       };
+       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
+       return ret;
+}
+long  __attribute__((visibility("default"))) TS_LDKRoutingMessageHandler_new(/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */ void* MessageSendEventsProvider) {
+       LDKRoutingMessageHandler *res_ptr = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
+       *res_ptr = LDKRoutingMessageHandler_init(o, MessageSendEventsProvider);
+       return (long)res_ptr;
+}
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_node_announcement(uint32_t this_arg, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKNodeAnnouncement msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_channel_announcement(uint32_t this_arg, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKChannelAnnouncement msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_channel_update(uint32_t this_arg, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKChannelUpdate msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = false;
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, &msg_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_htlc_fail_channel_update(uint32_t this_arg, uint32_t update) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKHTLCFailChannelUpdate* update_conv = (LDKHTLCFailChannelUpdate*)update;
+       (this_arg_conv->handle_htlc_fail_channel_update)(this_arg_conv->this_arg, update_conv);
+}
+
+uint32_tArray  __attribute__((visibility("default"))) TS_RoutingMessageHandler_get_next_channel_announcements(uint32_t this_arg, int64_t starting_point, int8_t batch_amount) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
+       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+       for (size_t l = 0; l < ret_var.datalen; l++) {
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+               *ret_conv_63_ref = ret_var.data[l];
+               ret_arr_ptr[l] = (long)ret_conv_63_ref;
+       }
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+uint32_tArray  __attribute__((visibility("default"))) TS_RoutingMessageHandler_get_next_node_announcements(uint32_t this_arg, int8_tArray starting_point, int8_t batch_amount) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey starting_point_ref;
+       CHECK(*((uint32_t*)starting_point) == 33);
+       memcpy(starting_point_ref.compressed_form, (uint8_t*)(starting_point + 4), 33);
+       LDKCVec_NodeAnnouncementZ ret_var = (this_arg_conv->get_next_node_announcements)(this_arg_conv->this_arg, starting_point_ref, batch_amount);
+       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
+       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
+       for (size_t s = 0; s < ret_var.datalen; s++) {
+               LDKNodeAnnouncement ret_conv_18_var = ret_var.data[s];
+               CHECK((((long)ret_conv_18_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+               CHECK((((long)&ret_conv_18_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+               long ret_conv_18_ref = (long)ret_conv_18_var.inner;
+               if (ret_conv_18_var.is_owned) {
+                       ret_conv_18_ref |= 1;
+               }
+               ret_arr_ptr[s] = ret_conv_18_ref;
+       }
+       FREE(ret_var.data);
+       return ret_arr;
+}
+
+void  __attribute__((visibility("default"))) TS_RoutingMessageHandler_sync_routing_table(uint32_t this_arg, int8_tArray their_node_id, uint32_t init) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKInit init_conv;
+       init_conv.inner = (void*)(init & (~1));
+       init_conv.is_owned = false;
+       (this_arg_conv->sync_routing_table)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_reply_channel_range(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKReplyChannelRange msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = ReplyChannelRange_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_reply_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_reply_short_channel_ids_end(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKReplyShortChannelIdsEnd msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = ReplyShortChannelIdsEnd_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_reply_short_channel_ids_end)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_query_channel_range(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKQueryChannelRange msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = QueryChannelRange_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_query_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_query_short_channel_ids(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
+       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
+       LDKPublicKey their_node_id_ref;
+       CHECK(*((uint32_t*)their_node_id) == 33);
+       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
+       LDKQueryShortChannelIds msg_conv;
+       msg_conv.inner = (void*)(msg & (~1));
+       msg_conv.is_owned = (msg & 1) || (msg == 0);
+       msg_conv = QueryShortChannelIds_clone(&msg_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = (this_arg_conv->handle_query_short_channel_ids)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+       return (long)ret_conv;
+}
+
+typedef struct LDKSocketDescriptor_JCalls {
+       atomic_size_t refcnt;
+       uint32_t send_data_meth;
+       uint32_t disconnect_socket_meth;
+       uint32_t eq_meth;
+       uint32_t hash_meth;
+} LDKSocketDescriptor_JCalls;
+static void LDKSocketDescriptor_JCalls_free(void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
+               js_free(j_calls->send_data_meth);
+               js_free(j_calls->disconnect_socket_meth);
+               js_free(j_calls->eq_meth);
+               js_free(j_calls->hash_meth);
+               FREE(j_calls);
+       }
 }
-static void* LDKFilter_JCalls_clone(const void* this_arg) {
-       LDKFilter_JCalls *j_calls = (LDKFilter_JCalls*) this_arg;
+uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       LDKu8slice data_var = data;
+       int8_tArray data_arr = init_arr(data_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(data_arr + 4), data_var.data, data_var.datalen);
+       return js_invoke_function_2(j_calls->send_data_meth, data_arr, resume_read);
+}
+void disconnect_socket_jcall(void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       js_invoke_function_0(j_calls->disconnect_socket_meth);
+}
+bool eq_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_1(j_calls->eq_meth, (long)other_arg_clone);
+}
+uint64_t hash_jcall(const void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
+       return js_invoke_function_0(j_calls->hash_meth);
+}
+static void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
+       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
        atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
        return (void*) this_arg;
 }
-static inline LDKFilter LDKFilter_init (/*TODO: JS Object Reference */void* o) {
-       LDKFilter_JCalls *calls = MALLOC(sizeof(LDKFilter_JCalls), "LDKFilter_JCalls");
+static inline LDKSocketDescriptor LDKSocketDescriptor_init (/*TODO: JS Object Reference */void* o) {
+       LDKSocketDescriptor_JCalls *calls = MALLOC(sizeof(LDKSocketDescriptor_JCalls), "LDKSocketDescriptor_JCalls");
        atomic_init(&calls->refcnt, 1);
        //TODO: Assign calls->o from o
 
-       LDKFilter ret = {
+       LDKSocketDescriptor ret = {
                .this_arg = (void*) calls,
-               .register_tx = register_tx_jcall,
-               .register_output = register_output_jcall,
-               .free = LDKFilter_JCalls_free,
+               .send_data = send_data_jcall,
+               .disconnect_socket = disconnect_socket_jcall,
+               .eq = eq_jcall,
+               .hash = hash_jcall,
+               .clone = LDKSocketDescriptor_JCalls_clone,
+               .free = LDKSocketDescriptor_JCalls_free,
        };
        return ret;
 }
-long  __attribute__((visibility("default"))) TS_LDKFilter_new(/*TODO: JS Object Reference */void* o) {
-       LDKFilter *res_ptr = MALLOC(sizeof(LDKFilter), "LDKFilter");
-       *res_ptr = LDKFilter_init(o);
+long  __attribute__((visibility("default"))) TS_LDKSocketDescriptor_new(/*TODO: JS Object Reference */void* o) {
+       LDKSocketDescriptor *res_ptr = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
+       *res_ptr = LDKSocketDescriptor_init(o);
        return (long)res_ptr;
 }
-void  __attribute__((visibility("default"))) TS_Filter_register_tx(uint32_t this_arg, int8_tArray txid, int8_tArray script_pubkey) {
-       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
-       unsigned char txid_arr[32];
-       CHECK(*((uint32_t*)txid) == 32);
-       memcpy(txid_arr, (uint8_t*)(txid + 4), 32);
-       unsigned char (*txid_ref)[32] = &txid_arr;
-       LDKu8slice script_pubkey_ref;
-       script_pubkey_ref.datalen = *((uint32_t*)script_pubkey);
-       script_pubkey_ref.data = (int8_t*)(script_pubkey + 4);
-       (this_arg_conv->register_tx)(this_arg_conv->this_arg, txid_ref, script_pubkey_ref);
+int64_t  __attribute__((visibility("default"))) TS_SocketDescriptor_send_data(uint32_t this_arg, int8_tArray data, jboolean resume_read) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       LDKu8slice data_ref;
+       data_ref.datalen = *((uint32_t*)data);
+       data_ref.data = (int8_t*)(data + 4);
+       int64_t ret_val = (this_arg_conv->send_data)(this_arg_conv->this_arg, data_ref, resume_read);
+       return ret_val;
 }
 
-void  __attribute__((visibility("default"))) TS_Filter_register_output(uint32_t this_arg, uint32_t outpoint, int8_tArray script_pubkey) {
-       LDKFilter* this_arg_conv = (LDKFilter*)this_arg;
-       LDKOutPoint outpoint_conv;
-       outpoint_conv.inner = (void*)(outpoint & (~1));
-       outpoint_conv.is_owned = false;
-       LDKu8slice script_pubkey_ref;
-       script_pubkey_ref.datalen = *((uint32_t*)script_pubkey);
-       script_pubkey_ref.data = (int8_t*)(script_pubkey + 4);
-       (this_arg_conv->register_output)(this_arg_conv->this_arg, &outpoint_conv, script_pubkey_ref);
+void  __attribute__((visibility("default"))) TS_SocketDescriptor_disconnect_socket(uint32_t this_arg) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       (this_arg_conv->disconnect_socket)(this_arg_conv->this_arg);
 }
 
-typedef struct LDKPersist_JCalls {
-       atomic_size_t refcnt;
-       uint32_t persist_new_channel_meth;
-       uint32_t update_persisted_channel_meth;
-} 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) {
-               js_free(j_calls->persist_new_channel_meth);
-               js_free(j_calls->update_persisted_channel_meth);
-               FREE(j_calls);
-       }
+int64_t  __attribute__((visibility("default"))) TS_SocketDescriptor_hash(uint32_t this_arg) {
+       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
+       int64_t ret_val = (this_arg_conv->hash)(this_arg_conv->this_arg);
+       return ret_val;
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ persist_new_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitor * data) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       LDKOutPoint id_var = id;
-       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long id_ref = (long)id_var.inner;
-       if (id_var.is_owned) {
-               id_ref |= 1;
-       }
-       LDKChannelMonitor data_var = *data;
-       data_var = ChannelMonitor_clone(data);
-       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long data_ref = (long)data_var.inner;
-       if (data_var.is_owned) {
-               data_ref |= 1;
-       }
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_2(j_calls->persist_new_channel_meth, id_ref, data_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
-       return ret_conv;
+
+void  __attribute__((visibility("default"))) TS_Transaction_free(int8_tArray _res) {
+       LDKTransaction _res_ref;
+       _res_ref.datalen = *((uint32_t*)_res);
+       _res_ref.data = MALLOC(_res_ref.datalen, "LDKTransaction Bytes");
+       memcpy(_res_ref.data, (uint8_t*)(_res + 4), _res_ref.datalen);
+       _res_ref.data_is_owned = true;
+       Transaction_free(_res_ref);
 }
-LDKCResult_NoneChannelMonitorUpdateErrZ update_persisted_channel_jcall(const void* this_arg, LDKOutPoint id, const LDKChannelMonitorUpdate * update, const LDKChannelMonitor * data) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       LDKOutPoint id_var = id;
-       CHECK((((long)id_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&id_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long id_ref = (long)id_var.inner;
-       if (id_var.is_owned) {
-               id_ref |= 1;
-       }
-       LDKChannelMonitorUpdate update_var = *update;
-       update_var = ChannelMonitorUpdate_clone(update);
-       CHECK((((long)update_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&update_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long update_ref = (long)update_var.inner;
-       if (update_var.is_owned) {
-               update_ref |= 1;
-       }
-       LDKChannelMonitor data_var = *data;
-       data_var = ChannelMonitor_clone(data);
-       CHECK((((long)data_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&data_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long data_ref = (long)data_var.inner;
-       if (data_var.is_owned) {
-               data_ref |= 1;
-       }
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret = (LDKCResult_NoneChannelMonitorUpdateErrZ*)js_invoke_function_3(j_calls->update_persisted_channel_meth, id_ref, update_ref, data_ref);
-       LDKCResult_NoneChannelMonitorUpdateErrZ ret_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone((LDKCResult_NoneChannelMonitorUpdateErrZ*)ret);
-       return ret_conv;
+
+void  __attribute__((visibility("default"))) TS_TxOut_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKTxOut _res_conv = *(LDKTxOut*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       TxOut_free(_res_conv);
 }
-static void* LDKPersist_JCalls_clone(const void* this_arg) {
-       LDKPersist_JCalls *j_calls = (LDKPersist_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+uint32_t  __attribute__((visibility("default"))) TS_TxOut_clone(uint32_t orig) {
+       LDKTxOut* orig_conv = (LDKTxOut*)(orig & ~1);
+       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
+       *ret_ref = TxOut_clone(orig_conv);
+       return (long)ret_ref;
 }
-static inline LDKPersist LDKPersist_init (/*TODO: JS Object Reference */void* o) {
-       LDKPersist_JCalls *calls = MALLOC(sizeof(LDKPersist_JCalls), "LDKPersist_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKPersist ret = {
-               .this_arg = (void*) calls,
-               .persist_new_channel = persist_new_channel_jcall,
-               .update_persisted_channel = update_persisted_channel_jcall,
-               .free = LDKPersist_JCalls_free,
-       };
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_SecretKeyErrorZ_ok(int8_tArray o) {
+       LDKSecretKey o_ref;
+       CHECK(*((uint32_t*)o) == 32);
+       memcpy(o_ref.bytes, (uint8_t*)(o + 4), 32);
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
+       *ret_conv = CResult_SecretKeyErrorZ_ok(o_ref);
+       return (long)ret_conv;
 }
-long  __attribute__((visibility("default"))) TS_LDKPersist_new(/*TODO: JS Object Reference */void* o) {
-       LDKPersist *res_ptr = MALLOC(sizeof(LDKPersist), "LDKPersist");
-       *res_ptr = LDKPersist_init(o);
-       return (long)res_ptr;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_SecretKeyErrorZ_err(uint32_t e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
+       *ret_conv = CResult_SecretKeyErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_Persist_persist_new_channel(uint32_t this_arg, uint32_t id, uint32_t data) {
-       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
-       LDKOutPoint id_conv;
-       id_conv.inner = (void*)(id & (~1));
-       id_conv.is_owned = (id & 1) || (id == 0);
-       id_conv = OutPoint_clone(&id_conv);
-       LDKChannelMonitor data_conv;
-       data_conv.inner = (void*)(data & (~1));
-       data_conv.is_owned = false;
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->persist_new_channel)(this_arg_conv->this_arg, id_conv, &data_conv);
+
+void  __attribute__((visibility("default"))) TS_CResult_SecretKeyErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_SecretKeyErrorZ _res_conv = *(LDKCResult_SecretKeyErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_SecretKeyErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PublicKeyErrorZ_ok(int8_tArray o) {
+       LDKPublicKey o_ref;
+       CHECK(*((uint32_t*)o) == 33);
+       memcpy(o_ref.compressed_form, (uint8_t*)(o + 4), 33);
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
+       *ret_conv = CResult_PublicKeyErrorZ_ok(o_ref);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PublicKeyErrorZ_err(uint32_t e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
+       *ret_conv = CResult_PublicKeyErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_PublicKeyErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_PublicKeyErrorZ _res_conv = *(LDKCResult_PublicKeyErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_PublicKeyErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysDecodeErrorZ_ok(uint32_t o) {
+       LDKTxCreationKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = TxCreationKeys_clone(&o_conv);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxCreationKeysDecodeErrorZ _res_conv = *(LDKCResult_TxCreationKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxCreationKeysDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_TxCreationKeysDecodeErrorZ* orig_conv = (LDKCResult_TxCreationKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = CResult_TxCreationKeysDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelPublicKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelPublicKeys_clone(&o_conv);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_Persist_update_persisted_channel(uint32_t this_arg, uint32_t id, uint32_t update, uint32_t data) {
-       LDKPersist* this_arg_conv = (LDKPersist*)this_arg;
-       LDKOutPoint id_conv;
-       id_conv.inner = (void*)(id & (~1));
-       id_conv.is_owned = (id & 1) || (id == 0);
-       id_conv = OutPoint_clone(&id_conv);
-       LDKChannelMonitorUpdate update_conv;
-       update_conv.inner = (void*)(update & (~1));
-       update_conv.is_owned = false;
-       LDKChannelMonitor data_conv;
-       data_conv.inner = (void*)(data & (~1));
-       data_conv.is_owned = false;
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = (this_arg_conv->update_persisted_channel)(this_arg_conv->this_arg, id_conv, &update_conv, &data_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-typedef struct LDKChannelMessageHandler_JCalls {
-       atomic_size_t refcnt;
-       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
-       uint32_t handle_open_channel_meth;
-       uint32_t handle_accept_channel_meth;
-       uint32_t handle_funding_created_meth;
-       uint32_t handle_funding_signed_meth;
-       uint32_t handle_funding_locked_meth;
-       uint32_t handle_shutdown_meth;
-       uint32_t handle_closing_signed_meth;
-       uint32_t handle_update_add_htlc_meth;
-       uint32_t handle_update_fulfill_htlc_meth;
-       uint32_t handle_update_fail_htlc_meth;
-       uint32_t handle_update_fail_malformed_htlc_meth;
-       uint32_t handle_commitment_signed_meth;
-       uint32_t handle_revoke_and_ack_meth;
-       uint32_t handle_update_fee_meth;
-       uint32_t handle_announcement_signatures_meth;
-       uint32_t peer_disconnected_meth;
-       uint32_t peer_connected_meth;
-       uint32_t handle_channel_reestablish_meth;
-       uint32_t handle_error_meth;
-} LDKChannelMessageHandler_JCalls;
-static void LDKChannelMessageHandler_JCalls_free(void* this_arg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->handle_open_channel_meth);
-               js_free(j_calls->handle_accept_channel_meth);
-               js_free(j_calls->handle_funding_created_meth);
-               js_free(j_calls->handle_funding_signed_meth);
-               js_free(j_calls->handle_funding_locked_meth);
-               js_free(j_calls->handle_shutdown_meth);
-               js_free(j_calls->handle_closing_signed_meth);
-               js_free(j_calls->handle_update_add_htlc_meth);
-               js_free(j_calls->handle_update_fulfill_htlc_meth);
-               js_free(j_calls->handle_update_fail_htlc_meth);
-               js_free(j_calls->handle_update_fail_malformed_htlc_meth);
-               js_free(j_calls->handle_commitment_signed_meth);
-               js_free(j_calls->handle_revoke_and_ack_meth);
-               js_free(j_calls->handle_update_fee_meth);
-               js_free(j_calls->handle_announcement_signatures_meth);
-               js_free(j_calls->peer_disconnected_meth);
-               js_free(j_calls->peer_connected_meth);
-               js_free(j_calls->handle_channel_reestablish_meth);
-               js_free(j_calls->handle_error_meth);
-               FREE(j_calls);
-       }
-}
-void handle_open_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKOpenChannel * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKInitFeatures their_features_var = their_features;
-       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long their_features_ref = (long)their_features_var.inner;
-       if (their_features_var.is_owned) {
-               their_features_ref |= 1;
-       }
-       LDKOpenChannel msg_var = *msg;
-       msg_var = OpenChannel_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_3(j_calls->handle_open_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
-}
-void handle_accept_channel_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKInitFeatures their_features, const LDKAcceptChannel * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKInitFeatures their_features_var = their_features;
-       CHECK((((long)their_features_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&their_features_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long their_features_ref = (long)their_features_var.inner;
-       if (their_features_var.is_owned) {
-               their_features_ref |= 1;
-       }
-       LDKAcceptChannel msg_var = *msg;
-       msg_var = AcceptChannel_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_3(j_calls->handle_accept_channel_meth, their_node_id_arr, their_features_ref, msg_ref);
+void  __attribute__((visibility("default"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelPublicKeysDecodeErrorZ _res_conv = *(LDKCResult_ChannelPublicKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelPublicKeysDecodeErrorZ_free(_res_conv);
 }
-void handle_funding_created_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingCreated * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKFundingCreated msg_var = *msg;
-       msg_var = FundingCreated_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_funding_created_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelPublicKeysDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* orig_conv = (LDKCResult_ChannelPublicKeysDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = CResult_ChannelPublicKeysDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_funding_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKFundingSigned msg_var = *msg;
-       msg_var = FundingSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_funding_signed_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysErrorZ_ok(uint32_t o) {
+       LDKTxCreationKeys o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = TxCreationKeys_clone(&o_conv);
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
+       *ret_conv = CResult_TxCreationKeysErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_funding_locked_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKFundingLocked * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKFundingLocked msg_var = *msg;
-       msg_var = FundingLocked_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_funding_locked_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysErrorZ_err(uint32_t e) {
+       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
+       *ret_conv = CResult_TxCreationKeysErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_shutdown_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKShutdown * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKShutdown msg_var = *msg;
-       msg_var = Shutdown_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_shutdown_meth, their_node_id_arr, msg_ref);
+
+void  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxCreationKeysErrorZ _res_conv = *(LDKCResult_TxCreationKeysErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxCreationKeysErrorZ_free(_res_conv);
 }
-void handle_closing_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKClosingSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKClosingSigned msg_var = *msg;
-       msg_var = ClosingSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_closing_signed_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(uint32_t o) {
+       LDKHTLCOutputInCommitment o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = HTLCOutputInCommitment_clone(&o_conv);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_update_add_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateAddHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKUpdateAddHTLC msg_var = *msg;
-       msg_var = UpdateAddHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_update_add_htlc_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_update_fulfill_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFulfillHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKUpdateFulfillHTLC msg_var = *msg;
-       msg_var = UpdateFulfillHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_update_fulfill_htlc_meth, their_node_id_arr, msg_ref);
+
+void  __attribute__((visibility("default"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res_conv = *(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res_conv);
 }
-void handle_update_fail_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKUpdateFailHTLC msg_var = *msg;
-       msg_var = UpdateFailHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_update_fail_htlc_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* orig_conv = (LDKCResult_HTLCOutputInCommitmentDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_update_fail_malformed_htlc_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFailMalformedHTLC * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKUpdateFailMalformedHTLC msg_var = *msg;
-       msg_var = UpdateFailMalformedHTLC_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_update_fail_malformed_htlc_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(uint32_t o) {
+       LDKCounterpartyChannelTransactionParameters o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = CounterpartyChannelTransactionParameters_clone(&o_conv);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void handle_commitment_signed_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKCommitmentSigned * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKCommitmentSigned msg_var = *msg;
-       msg_var = CommitmentSigned_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_commitment_signed_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void handle_revoke_and_ack_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKRevokeAndACK * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKRevokeAndACK msg_var = *msg;
-       msg_var = RevokeAndACK_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_revoke_and_ack_meth, their_node_id_arr, msg_ref);
+
+void  __attribute__((visibility("default"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res_conv = *(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res_conv);
 }
-void handle_update_fee_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKUpdateFee * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKUpdateFee msg_var = *msg;
-       msg_var = UpdateFee_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_update_fee_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* orig_conv = (LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_announcement_signatures_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKAnnouncementSignatures * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKAnnouncementSignatures msg_var = *msg;
-       msg_var = AnnouncementSignatures_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_announcement_signatures_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelTransactionParameters o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelTransactionParameters_clone(&o_conv);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void peer_disconnected_jcall(const void* this_arg, LDKPublicKey their_node_id, bool no_connection_possible) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       js_invoke_function_2(j_calls->peer_disconnected_meth, their_node_id_arr, no_connection_possible);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-void peer_connected_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKInit msg_var = *msg;
-       msg_var = Init_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->peer_connected_meth, their_node_id_arr, msg_ref);
+
+void  __attribute__((visibility("default"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ _res_conv = *(LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelTransactionParametersDecodeErrorZ_free(_res_conv);
 }
-void handle_channel_reestablish_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKChannelReestablish * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKChannelReestablish msg_var = *msg;
-       msg_var = ChannelReestablish_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->handle_channel_reestablish_meth, their_node_id_arr, msg_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelTransactionParametersDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* orig_conv = (LDKCResult_ChannelTransactionParametersDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-void handle_error_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKErrorMessage * msg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKErrorMessage msg_var = *msg;
-       msg_var = ErrorMessage_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+
+void  __attribute__((visibility("default"))) TS_CVec_SignatureZ_free(ptrArray _res) {
+       LDKCVec_SignatureZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
+       else
+               _res_constr.data = NULL;
+       int8_tArray* _res_vals = (int8_tArray*)(_res + 4);
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               int8_tArray _res_conv_12 = _res_vals[m];
+               LDKSignature _res_conv_12_ref;
+               CHECK(*((uint32_t*)_res_conv_12) == 64);
+               memcpy(_res_conv_12_ref.compact_form, (uint8_t*)(_res_conv_12 + 4), 64);
+               _res_constr.data[m] = _res_conv_12_ref;
        }
-       js_invoke_function_2(j_calls->handle_error_meth, their_node_id_arr, msg_ref);
+       CVec_SignatureZ_free(_res_constr);
 }
-static void* LDKChannelMessageHandler_JCalls_clone(const void* this_arg) {
-       LDKChannelMessageHandler_JCalls *j_calls = (LDKChannelMessageHandler_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_ok(uint32_t o) {
+       LDKHolderCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = HolderCommitmentTransaction_clone(&o_conv);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-static inline LDKChannelMessageHandler LDKChannelMessageHandler_init (/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */void* MessageSendEventsProvider) {
-       LDKChannelMessageHandler_JCalls *calls = MALLOC(sizeof(LDKChannelMessageHandler_JCalls), "LDKChannelMessageHandler_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKChannelMessageHandler ret = {
-               .this_arg = (void*) calls,
-               .handle_open_channel = handle_open_channel_jcall,
-               .handle_accept_channel = handle_accept_channel_jcall,
-               .handle_funding_created = handle_funding_created_jcall,
-               .handle_funding_signed = handle_funding_signed_jcall,
-               .handle_funding_locked = handle_funding_locked_jcall,
-               .handle_shutdown = handle_shutdown_jcall,
-               .handle_closing_signed = handle_closing_signed_jcall,
-               .handle_update_add_htlc = handle_update_add_htlc_jcall,
-               .handle_update_fulfill_htlc = handle_update_fulfill_htlc_jcall,
-               .handle_update_fail_htlc = handle_update_fail_htlc_jcall,
-               .handle_update_fail_malformed_htlc = handle_update_fail_malformed_htlc_jcall,
-               .handle_commitment_signed = handle_commitment_signed_jcall,
-               .handle_revoke_and_ack = handle_revoke_and_ack_jcall,
-               .handle_update_fee = handle_update_fee_jcall,
-               .handle_announcement_signatures = handle_announcement_signatures_jcall,
-               .peer_disconnected = peer_disconnected_jcall,
-               .peer_connected = peer_connected_jcall,
-               .handle_channel_reestablish = handle_channel_reestablish_jcall,
-               .handle_error = handle_error_jcall,
-               .free = LDKChannelMessageHandler_JCalls_free,
-               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
-       };
-       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-long  __attribute__((visibility("default"))) TS_LDKChannelMessageHandler_new(/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */ void* MessageSendEventsProvider) {
-       LDKChannelMessageHandler *res_ptr = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
-       *res_ptr = LDKChannelMessageHandler_init(o, MessageSendEventsProvider);
-       return (long)res_ptr;
+
+void  __attribute__((visibility("default"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res_conv);
 }
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_open_channel(uint32_t this_arg, int8_tArray their_node_id, uint32_t their_features, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKInitFeatures their_features_conv;
-       their_features_conv.inner = (void*)(their_features & (~1));
-       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
-       LDKOpenChannel msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_open_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HolderCommitmentTransactionDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_HolderCommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_accept_channel(uint32_t this_arg, int8_tArray their_node_id, uint32_t their_features, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKInitFeatures their_features_conv;
-       their_features_conv.inner = (void*)(their_features & (~1));
-       their_features_conv.is_owned = (their_features & 1) || (their_features == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
-       LDKAcceptChannel msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_accept_channel)(this_arg_conv->this_arg, their_node_id_ref, their_features_conv, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(uint32_t o) {
+       LDKBuiltCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = BuiltCommitmentTransaction_clone(&o_conv);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_created(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKFundingCreated msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_created)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKFundingSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+void  __attribute__((visibility("default"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_funding_locked(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKFundingLocked msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_funding_locked)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_BuiltCommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentTransactionDecodeErrorZ_ok(uint32_t o) {
+       LDKCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = CommitmentTransaction_clone(&o_conv);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentTransactionDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_shutdown(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKShutdown msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_shutdown)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+void  __attribute__((visibility("default"))) TS_CResult_CommitmentTransactionDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CommitmentTransactionDecodeErrorZ _res_conv = *(LDKCResult_CommitmentTransactionDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CommitmentTransactionDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_closing_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKClosingSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_closing_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentTransactionDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_CommitmentTransactionDecodeErrorZ* orig_conv = (LDKCResult_CommitmentTransactionDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CResult_CommitmentTransactionDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_add_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKUpdateAddHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_add_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_ok(uint32_t o) {
+       LDKTrustedCommitmentTransaction o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       // Warning: we need a move here but no clone is available for LDKTrustedCommitmentTransaction
+       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
+       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fulfill_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKUpdateFulfillHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fulfill_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_err() {
+       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
+       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_err();
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fail_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKUpdateFailHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fail_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+void  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TrustedCommitmentTransactionNoneZ _res_conv = *(LDKCResult_TrustedCommitmentTransactionNoneZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TrustedCommitmentTransactionNoneZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fail_malformed_htlc(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKUpdateFailMalformedHTLC msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fail_malformed_htlc)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_ok(ptrArray o) {
+       LDKCVec_SignatureZ o_constr;
+       o_constr.datalen = *((uint32_t*)o);
+       if (o_constr.datalen > 0)
+               o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
+       else
+               o_constr.data = NULL;
+       int8_tArray* o_vals = (int8_tArray*)(o + 4);
+       for (size_t m = 0; m < o_constr.datalen; m++) {
+               int8_tArray o_conv_12 = o_vals[m];
+               LDKSignature o_conv_12_ref;
+               CHECK(*((uint32_t*)o_conv_12) == 64);
+               memcpy(o_conv_12_ref.compact_form, (uint8_t*)(o_conv_12 + 4), 64);
+               o_constr.data[m] = o_conv_12_ref;
+       }
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_ok(o_constr);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_commitment_signed(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKCommitmentSigned msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_commitment_signed)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_err() {
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_err();
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_revoke_and_ack(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKRevokeAndACK msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_revoke_and_ack)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+void  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CVec_SignatureZNoneZ _res_conv = *(LDKCResult_CVec_SignatureZNoneZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CVec_SignatureZNoneZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_update_fee(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKUpdateFee msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_update_fee)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_clone(uint32_t orig) {
+       LDKCResult_CVec_SignatureZNoneZ* orig_conv = (LDKCResult_CVec_SignatureZNoneZ*)(orig & ~1);
+       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
+       *ret_conv = CResult_CVec_SignatureZNoneZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_announcement_signatures(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKAnnouncementSignatures msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_announcement_signatures)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+void  __attribute__((visibility("default"))) TS_CVec_MessageSendEventZ_free(uint32_tArray _res) {
+       LDKCVec_MessageSendEventZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t s = 0; s < _res_constr.datalen; s++) {
+               uint32_t _res_conv_18 = _res_vals[s];
+               LDKMessageSendEvent _res_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)_res_conv_18) & ~1);
+               FREE((void*)_res_conv_18);
+               _res_constr.data[s] = _res_conv_18_conv;
+       }
+       CVec_MessageSendEventZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_peer_disconnected(uint32_t this_arg, int8_tArray their_node_id, jboolean no_connection_possible) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       (this_arg_conv->peer_disconnected)(this_arg_conv->this_arg, their_node_id_ref, no_connection_possible);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_ok(jboolean o) {
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = CResult_boolLightningErrorZ_ok(o);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_peer_connected(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKInit msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->peer_connected)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_err(uint32_t e) {
+       LDKLightningError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = LightningError_clone(&e_conv);
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = CResult_boolLightningErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_channel_reestablish(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKChannelReestablish msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_channel_reestablish)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+void  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_boolLightningErrorZ _res_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_boolLightningErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelMessageHandler_handle_error(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKChannelMessageHandler* this_arg_conv = (LDKChannelMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKErrorMessage msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       (this_arg_conv->handle_error)(this_arg_conv->this_arg, their_node_id_ref, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_clone(uint32_t orig) {
+       LDKCResult_boolLightningErrorZ* orig_conv = (LDKCResult_boolLightningErrorZ*)(orig & ~1);
+       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
+       *ret_conv = CResult_boolLightningErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-typedef struct LDKRoutingMessageHandler_JCalls {
-       atomic_size_t refcnt;
-       LDKMessageSendEventsProvider_JCalls* MessageSendEventsProvider;
-       uint32_t handle_node_announcement_meth;
-       uint32_t handle_channel_announcement_meth;
-       uint32_t handle_channel_update_meth;
-       uint32_t handle_htlc_fail_channel_update_meth;
-       uint32_t get_next_channel_announcements_meth;
-       uint32_t get_next_node_announcements_meth;
-       uint32_t sync_routing_table_meth;
-       uint32_t handle_reply_channel_range_meth;
-       uint32_t handle_reply_short_channel_ids_end_meth;
-       uint32_t handle_query_channel_range_meth;
-       uint32_t handle_query_short_channel_ids_meth;
-} LDKRoutingMessageHandler_JCalls;
-static void LDKRoutingMessageHandler_JCalls_free(void* this_arg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->handle_node_announcement_meth);
-               js_free(j_calls->handle_channel_announcement_meth);
-               js_free(j_calls->handle_channel_update_meth);
-               js_free(j_calls->handle_htlc_fail_channel_update_meth);
-               js_free(j_calls->get_next_channel_announcements_meth);
-               js_free(j_calls->get_next_node_announcements_meth);
-               js_free(j_calls->sync_routing_table_meth);
-               js_free(j_calls->handle_reply_channel_range_meth);
-               js_free(j_calls->handle_reply_short_channel_ids_end_meth);
-               js_free(j_calls->handle_query_channel_range_meth);
-               js_free(j_calls->handle_query_short_channel_ids_meth);
-               FREE(j_calls);
-       }
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(uint32_t orig) {
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* orig_conv = (LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(orig & ~1);
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig_conv);
+       return (long)ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
+       LDKChannelAnnouncement a_conv;
+       a_conv.inner = (void*)(a & (~1));
+       a_conv.is_owned = (a & 1) || (a == 0);
+       a_conv = ChannelAnnouncement_clone(&a_conv);
+       LDKChannelUpdate b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelUpdate_clone(&b_conv);
+       LDKChannelUpdate c_conv;
+       c_conv.inner = (void*)(c & (~1));
+       c_conv.is_owned = (c & 1) || (c == 0);
+       c_conv = ChannelUpdate_clone(&c_conv);
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
+       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
+       return (long)ret_ref;
 }
-LDKCResult_boolLightningErrorZ handle_node_announcement_jcall(const void* this_arg, const LDKNodeAnnouncement * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       LDKNodeAnnouncement msg_var = *msg;
-       msg_var = NodeAnnouncement_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_node_announcement_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+
+void  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res_conv);
 }
-LDKCResult_boolLightningErrorZ handle_channel_announcement_jcall(const void* this_arg, const LDKChannelAnnouncement * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       LDKChannelAnnouncement msg_var = *msg;
-       msg_var = ChannelAnnouncement_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+
+void  __attribute__((visibility("default"))) TS_CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(uint32_tArray _res) {
+       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t l = 0; l < _res_constr.datalen; l++) {
+               uint32_t _res_conv_63 = _res_vals[l];
+               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res_conv_63) & ~1);
+               FREE((void*)_res_conv_63);
+               _res_constr.data[l] = _res_conv_63_conv;
        }
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_channel_announcement_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
 }
-LDKCResult_boolLightningErrorZ handle_channel_update_jcall(const void* this_arg, const LDKChannelUpdate * msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       LDKChannelUpdate msg_var = *msg;
-       msg_var = ChannelUpdate_clone(msg);
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+
+void  __attribute__((visibility("default"))) TS_CVec_NodeAnnouncementZ_free(uint32_tArray _res) {
+       LDKCVec_NodeAnnouncementZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t s = 0; s < _res_constr.datalen; s++) {
+               uint32_t _res_conv_18 = _res_vals[s];
+               LDKNodeAnnouncement _res_conv_18_conv;
+               _res_conv_18_conv.inner = (void*)(_res_conv_18 & (~1));
+               _res_conv_18_conv.is_owned = (_res_conv_18 & 1) || (_res_conv_18 == 0);
+               _res_constr.data[s] = _res_conv_18_conv;
        }
-       LDKCResult_boolLightningErrorZ* ret = (LDKCResult_boolLightningErrorZ*)js_invoke_function_1(j_calls->handle_channel_update_meth, msg_ref);
-       LDKCResult_boolLightningErrorZ ret_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_boolLightningErrorZ_clone((LDKCResult_boolLightningErrorZ*)ret);
-       return ret_conv;
+       CVec_NodeAnnouncementZ_free(_res_constr);
 }
-void handle_htlc_fail_channel_update_jcall(const void* this_arg, const LDKHTLCFailChannelUpdate * update) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       long ret_update = (long)update;
-       js_invoke_function_1(j_calls->handle_htlc_fail_channel_update_meth, ret_update);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_ok() {
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = CResult_NoneLightningErrorZ_ok();
+       return (long)ret_conv;
 }
-LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ get_next_channel_announcements_jcall(const void* this_arg, uint64_t starting_point, uint8_t batch_amount) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       uint32_tArray arg = js_invoke_function_2(j_calls->get_next_channel_announcements_meth, starting_point, batch_amount);
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ arg_constr;
-       arg_constr.datalen = *((uint32_t*)arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
-       else
-               arg_constr.data = NULL;
-       uint32_t* arg_vals = (uint32_t*)(arg + 4);
-       for (size_t l = 0; l < arg_constr.datalen; l++) {
-               uint32_t arr_conv_63 = arg_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
-               FREE((void*)arr_conv_63);
-               arg_constr.data[l] = arr_conv_63_conv;
-       }
-       return arg_constr;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_err(uint32_t e) {
+       LDKLightningError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = LightningError_clone(&e_conv);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = CResult_NoneLightningErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-LDKCVec_NodeAnnouncementZ get_next_node_announcements_jcall(const void* this_arg, LDKPublicKey starting_point, uint8_t batch_amount) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray starting_point_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(starting_point_arr + 4), starting_point.compressed_form, 33);
-       uint32_tArray arg = js_invoke_function_2(j_calls->get_next_node_announcements_meth, starting_point_arr, batch_amount);
-       LDKCVec_NodeAnnouncementZ arg_constr;
-       arg_constr.datalen = *((uint32_t*)arg);
-       if (arg_constr.datalen > 0)
-               arg_constr.data = MALLOC(arg_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
-       else
-               arg_constr.data = NULL;
-       uint32_t* arg_vals = (uint32_t*)(arg + 4);
-       for (size_t s = 0; s < arg_constr.datalen; s++) {
-               uint32_t arr_conv_18 = arg_vals[s];
-               LDKNodeAnnouncement arr_conv_18_conv;
-               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
-               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
-               arr_conv_18_conv = NodeAnnouncement_clone(&arr_conv_18_conv);
-               arg_constr.data[s] = arr_conv_18_conv;
-       }
-       return arg_constr;
+
+void  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NoneLightningErrorZ _res_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NoneLightningErrorZ_free(_res_conv);
 }
-void sync_routing_table_jcall(const void* this_arg, LDKPublicKey their_node_id, const LDKInit * init) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKInit init_var = *init;
-       init_var = Init_clone(init);
-       CHECK((((long)init_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&init_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long init_ref = (long)init_var.inner;
-       if (init_var.is_owned) {
-               init_ref |= 1;
-       }
-       js_invoke_function_2(j_calls->sync_routing_table_meth, their_node_id_arr, init_ref);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_clone(uint32_t orig) {
+       LDKCResult_NoneLightningErrorZ* orig_conv = (LDKCResult_NoneLightningErrorZ*)(orig & ~1);
+       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
+       *ret_conv = CResult_NoneLightningErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-LDKCResult_NoneLightningErrorZ handle_reply_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyChannelRange msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKReplyChannelRange msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
+
+void  __attribute__((visibility("default"))) TS_CVec_PublicKeyZ_free(ptrArray _res) {
+       LDKCVec_PublicKeyZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
+       else
+               _res_constr.data = NULL;
+       int8_tArray* _res_vals = (int8_tArray*)(_res + 4);
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               int8_tArray _res_conv_12 = _res_vals[m];
+               LDKPublicKey _res_conv_12_ref;
+               CHECK(*((uint32_t*)_res_conv_12) == 33);
+               memcpy(_res_conv_12_ref.compressed_form, (uint8_t*)(_res_conv_12 + 4), 33);
+               _res_constr.data[m] = _res_conv_12_ref;
        }
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_reply_channel_range_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+       CVec_PublicKeyZ_free(_res_constr);
 }
-LDKCResult_NoneLightningErrorZ handle_reply_short_channel_ids_end_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKReplyShortChannelIdsEnd msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKReplyShortChannelIdsEnd msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_reply_short_channel_ids_end_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+void  __attribute__((visibility("default"))) TS_CVec_u8Z_free(int8_tArray _res) {
+       LDKCVec_u8Z _res_ref;
+       _res_ref.datalen = *((uint32_t*)_res);
+       _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(_res_ref.data, (uint8_t*)(_res + 4), _res_ref.datalen);
+       CVec_u8Z_free(_res_ref);
 }
-LDKCResult_NoneLightningErrorZ handle_query_channel_range_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryChannelRange msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKQueryChannelRange msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_query_channel_range_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_ok(int8_tArray o) {
+       LDKCVec_u8Z o_ref;
+       o_ref.datalen = *((uint32_t*)o);
+       o_ref.data = MALLOC(o_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(o_ref.data, (uint8_t*)(o + 4), o_ref.datalen);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_ok(o_ref);
+       return (long)ret_conv;
 }
-LDKCResult_NoneLightningErrorZ handle_query_short_channel_ids_jcall(const void* this_arg, LDKPublicKey their_node_id, LDKQueryShortChannelIds msg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       int8_tArray their_node_id_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(their_node_id_arr + 4), their_node_id.compressed_form, 33);
-       LDKQueryShortChannelIds msg_var = msg;
-       CHECK((((long)msg_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&msg_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long msg_ref = (long)msg_var.inner;
-       if (msg_var.is_owned) {
-               msg_ref |= 1;
-       }
-       LDKCResult_NoneLightningErrorZ* ret = (LDKCResult_NoneLightningErrorZ*)js_invoke_function_2(j_calls->handle_query_short_channel_ids_meth, their_node_id_arr, msg_ref);
-       LDKCResult_NoneLightningErrorZ ret_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)ret) & ~1);
-       ret_conv = CResult_NoneLightningErrorZ_clone((LDKCResult_NoneLightningErrorZ*)ret);
-       return ret_conv;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_err(uint32_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-static void* LDKRoutingMessageHandler_JCalls_clone(const void* this_arg) {
-       LDKRoutingMessageHandler_JCalls *j_calls = (LDKRoutingMessageHandler_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       atomic_fetch_add_explicit(&j_calls->MessageSendEventsProvider->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+void  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_CVec_u8ZPeerHandleErrorZ _res_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_CVec_u8ZPeerHandleErrorZ_free(_res_conv);
 }
-static inline LDKRoutingMessageHandler LDKRoutingMessageHandler_init (/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */void* MessageSendEventsProvider) {
-       LDKRoutingMessageHandler_JCalls *calls = MALLOC(sizeof(LDKRoutingMessageHandler_JCalls), "LDKRoutingMessageHandler_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKRoutingMessageHandler ret = {
-               .this_arg = (void*) calls,
-               .handle_node_announcement = handle_node_announcement_jcall,
-               .handle_channel_announcement = handle_channel_announcement_jcall,
-               .handle_channel_update = handle_channel_update_jcall,
-               .handle_htlc_fail_channel_update = handle_htlc_fail_channel_update_jcall,
-               .get_next_channel_announcements = get_next_channel_announcements_jcall,
-               .get_next_node_announcements = get_next_node_announcements_jcall,
-               .sync_routing_table = sync_routing_table_jcall,
-               .handle_reply_channel_range = handle_reply_channel_range_jcall,
-               .handle_reply_short_channel_ids_end = handle_reply_short_channel_ids_end_jcall,
-               .handle_query_channel_range = handle_query_channel_range_jcall,
-               .handle_query_short_channel_ids = handle_query_short_channel_ids_jcall,
-               .free = LDKRoutingMessageHandler_JCalls_free,
-               .MessageSendEventsProvider = LDKMessageSendEventsProvider_init(MessageSendEventsProvider),
-       };
-       calls->MessageSendEventsProvider = ret.MessageSendEventsProvider.this_arg;
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_clone(uint32_t orig) {
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* orig_conv = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
+       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_ok() {
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_ok();
+       return (long)ret_conv;
 }
-long  __attribute__((visibility("default"))) TS_LDKRoutingMessageHandler_new(/*TODO: JS Object Reference */void* o, /*TODO: JS Object Reference */ void* MessageSendEventsProvider) {
-       LDKRoutingMessageHandler *res_ptr = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
-       *res_ptr = LDKRoutingMessageHandler_init(o, MessageSendEventsProvider);
-       return (long)res_ptr;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_err(uint32_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_node_announcement(uint32_t this_arg, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKNodeAnnouncement msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_node_announcement)(this_arg_conv->this_arg, &msg_conv);
+
+void  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NonePeerHandleErrorZ _res_conv = *(LDKCResult_NonePeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NonePeerHandleErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_clone(uint32_t orig) {
+       LDKCResult_NonePeerHandleErrorZ* orig_conv = (LDKCResult_NonePeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
+       *ret_conv = CResult_NonePeerHandleErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_channel_announcement(uint32_t this_arg, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKChannelAnnouncement msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_channel_announcement)(this_arg_conv->this_arg, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_ok(jboolean o) {
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_ok(o);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_channel_update(uint32_t this_arg, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKChannelUpdate msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = false;
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_channel_update)(this_arg_conv->this_arg, &msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_err(uint32_t e) {
+       LDKPeerHandleError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = PeerHandleError_clone(&e_conv);
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_htlc_fail_channel_update(uint32_t this_arg, uint32_t update) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKHTLCFailChannelUpdate* update_conv = (LDKHTLCFailChannelUpdate*)update;
-       (this_arg_conv->handle_htlc_fail_channel_update)(this_arg_conv->this_arg, update_conv);
+void  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_boolPeerHandleErrorZ _res_conv = *(LDKCResult_boolPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_boolPeerHandleErrorZ_free(_res_conv);
 }
 
-uint32_tArray  __attribute__((visibility("default"))) TS_RoutingMessageHandler_get_next_channel_announcements(uint32_t this_arg, int64_t starting_point, int8_t batch_amount) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ ret_var = (this_arg_conv->get_next_channel_announcements)(this_arg_conv->this_arg, starting_point, batch_amount);
-       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
-       for (size_t l = 0; l < ret_var.datalen; l++) {
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* arr_conv_63_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-               *arr_conv_63_ref = ret_var.data[l];
-               ret_arr_ptr[l] = (long)arr_conv_63_ref;
-       }
-       FREE(ret_var.data);
-       return ret_arr;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_clone(uint32_t orig) {
+       LDKCResult_boolPeerHandleErrorZ* orig_conv = (LDKCResult_boolPeerHandleErrorZ*)(orig & ~1);
+       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
+       *ret_conv = CResult_boolPeerHandleErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-uint32_tArray  __attribute__((visibility("default"))) TS_RoutingMessageHandler_get_next_node_announcements(uint32_t this_arg, int8_tArray starting_point, int8_t batch_amount) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey starting_point_ref;
-       CHECK(*((uint32_t*)starting_point) == 33);
-       memcpy(starting_point_ref.compressed_form, (uint8_t*)(starting_point + 4), 33);
-       LDKCVec_NodeAnnouncementZ ret_var = (this_arg_conv->get_next_node_announcements)(this_arg_conv->this_arg, starting_point_ref, batch_amount);
-       uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
-       uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
-       for (size_t s = 0; s < ret_var.datalen; s++) {
-               LDKNodeAnnouncement arr_conv_18_var = ret_var.data[s];
-               CHECK((((long)arr_conv_18_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_18_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_18_ref = (long)arr_conv_18_var.inner;
-               if (arr_conv_18_var.is_owned) {
-                       arr_conv_18_ref |= 1;
-               }
-               ret_arr_ptr[s] = arr_conv_18_ref;
-       }
-       FREE(ret_var.data);
-       return ret_arr;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InitFeaturesDecodeErrorZ_ok(uint32_t o) {
+       LDKInitFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = InitFeatures_clone(&o_conv);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = CResult_InitFeaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_RoutingMessageHandler_sync_routing_table(uint32_t this_arg, int8_tArray their_node_id, uint32_t init) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKInit init_conv;
-       init_conv.inner = (void*)(init & (~1));
-       init_conv.is_owned = false;
-       (this_arg_conv->sync_routing_table)(this_arg_conv->this_arg, their_node_id_ref, &init_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InitFeaturesDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = CResult_InitFeaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_reply_channel_range(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKReplyChannelRange msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = ReplyChannelRange_clone(&msg_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_reply_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+void  __attribute__((visibility("default"))) TS_CResult_InitFeaturesDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_InitFeaturesDecodeErrorZ _res_conv = *(LDKCResult_InitFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_InitFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeFeaturesDecodeErrorZ_ok(uint32_t o) {
+       LDKNodeFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeFeatures_clone(&o_conv);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = CResult_NodeFeaturesDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_reply_short_channel_ids_end(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKReplyShortChannelIdsEnd msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = ReplyShortChannelIdsEnd_clone(&msg_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_reply_short_channel_ids_end)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeFeaturesDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = CResult_NodeFeaturesDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_query_channel_range(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKQueryChannelRange msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = QueryChannelRange_clone(&msg_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_query_channel_range)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+void  __attribute__((visibility("default"))) TS_CResult_NodeFeaturesDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NodeFeaturesDecodeErrorZ _res_conv = *(LDKCResult_NodeFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NodeFeaturesDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelFeaturesDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelFeatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelFeatures_clone(&o_conv);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingMessageHandler_handle_query_short_channel_ids(uint32_t this_arg, int8_tArray their_node_id, uint32_t msg) {
-       LDKRoutingMessageHandler* this_arg_conv = (LDKRoutingMessageHandler*)this_arg;
-       LDKPublicKey their_node_id_ref;
-       CHECK(*((uint32_t*)their_node_id) == 33);
-       memcpy(their_node_id_ref.compressed_form, (uint8_t*)(their_node_id + 4), 33);
-       LDKQueryShortChannelIds msg_conv;
-       msg_conv.inner = (void*)(msg & (~1));
-       msg_conv.is_owned = (msg & 1) || (msg == 0);
-       msg_conv = QueryShortChannelIds_clone(&msg_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = (this_arg_conv->handle_query_short_channel_ids)(this_arg_conv->this_arg, their_node_id_ref, msg_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelFeaturesDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = CResult_ChannelFeaturesDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-typedef struct LDKSocketDescriptor_JCalls {
-       atomic_size_t refcnt;
-       uint32_t send_data_meth;
-       uint32_t disconnect_socket_meth;
-       uint32_t eq_meth;
-       uint32_t hash_meth;
-} LDKSocketDescriptor_JCalls;
-static void LDKSocketDescriptor_JCalls_free(void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       if (atomic_fetch_sub_explicit(&j_calls->refcnt, 1, memory_order_acquire) == 1) {
-               js_free(j_calls->send_data_meth);
-               js_free(j_calls->disconnect_socket_meth);
-               js_free(j_calls->eq_meth);
-               js_free(j_calls->hash_meth);
-               FREE(j_calls);
-       }
+void  __attribute__((visibility("default"))) TS_CResult_ChannelFeaturesDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelFeaturesDecodeErrorZ _res_conv = *(LDKCResult_ChannelFeaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelFeaturesDecodeErrorZ_free(_res_conv);
 }
-uintptr_t send_data_jcall(void* this_arg, LDKu8slice data, bool resume_read) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       LDKu8slice data_var = data;
-       int8_tArray data_arr = init_arr(data_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(data_arr + 4), data_var.data, data_var.datalen);
-       return js_invoke_function_2(j_calls->send_data_meth, data_arr, resume_read);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelConfigDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelConfig o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelConfig_clone(&o_conv);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-void disconnect_socket_jcall(void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       js_invoke_function_0(j_calls->disconnect_socket_meth);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelConfigDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
-bool eq_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_1(j_calls->eq_meth, (long)other_arg_clone);
+
+void  __attribute__((visibility("default"))) TS_CResult_ChannelConfigDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelConfigDecodeErrorZ _res_conv = *(LDKCResult_ChannelConfigDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelConfigDecodeErrorZ_free(_res_conv);
 }
-uint64_t hash_jcall(const void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       return js_invoke_function_0(j_calls->hash_meth);
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelConfigDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelConfigDecodeErrorZ* orig_conv = (LDKCResult_ChannelConfigDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = CResult_ChannelConfigDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-static void* LDKSocketDescriptor_JCalls_clone(const void* this_arg) {
-       LDKSocketDescriptor_JCalls *j_calls = (LDKSocketDescriptor_JCalls*) this_arg;
-       atomic_fetch_add_explicit(&j_calls->refcnt, 1, memory_order_release);
-       return (void*) this_arg;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_DirectionalChannelInfoDecodeErrorZ_ok(uint32_t o) {
+       LDKDirectionalChannelInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = DirectionalChannelInfo_clone(&o_conv);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
-static inline LDKSocketDescriptor LDKSocketDescriptor_init (/*TODO: JS Object Reference */void* o) {
-       LDKSocketDescriptor_JCalls *calls = MALLOC(sizeof(LDKSocketDescriptor_JCalls), "LDKSocketDescriptor_JCalls");
-       atomic_init(&calls->refcnt, 1);
-       //TODO: Assign calls->o from o
 
-       LDKSocketDescriptor ret = {
-               .this_arg = (void*) calls,
-               .send_data = send_data_jcall,
-               .disconnect_socket = disconnect_socket_jcall,
-               .eq = eq_jcall,
-               .hash = hash_jcall,
-               .clone = LDKSocketDescriptor_JCalls_clone,
-               .free = LDKSocketDescriptor_JCalls_free,
-       };
-       return ret;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_DirectionalChannelInfoDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_DirectionalChannelInfoDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ _res_conv = *(LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_DirectionalChannelInfoDecodeErrorZ_free(_res_conv);
 }
-long  __attribute__((visibility("default"))) TS_LDKSocketDescriptor_new(/*TODO: JS Object Reference */void* o) {
-       LDKSocketDescriptor *res_ptr = MALLOC(sizeof(LDKSocketDescriptor), "LDKSocketDescriptor");
-       *res_ptr = LDKSocketDescriptor_init(o);
-       return (long)res_ptr;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_DirectionalChannelInfoDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* orig_conv = (LDKCResult_DirectionalChannelInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
-int64_t  __attribute__((visibility("default"))) TS_SocketDescriptor_send_data(uint32_t this_arg, int8_tArray data, jboolean resume_read) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       LDKu8slice data_ref;
-       data_ref.datalen = *((uint32_t*)data);
-       data_ref.data = (int8_t*)(data + 4);
-       int64_t ret_val = (this_arg_conv->send_data)(this_arg_conv->this_arg, data_ref, resume_read);
-       return ret_val;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelInfoDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelInfo_clone(&o_conv);
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_ChannelInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_SocketDescriptor_disconnect_socket(uint32_t this_arg) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       (this_arg_conv->disconnect_socket)(this_arg_conv->this_arg);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelInfoDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_ChannelInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-int64_t  __attribute__((visibility("default"))) TS_SocketDescriptor_hash(uint32_t this_arg) {
-       LDKSocketDescriptor* this_arg_conv = (LDKSocketDescriptor*)this_arg;
-       int64_t ret_val = (this_arg_conv->hash)(this_arg_conv->this_arg);
-       return ret_val;
+void  __attribute__((visibility("default"))) TS_CResult_ChannelInfoDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelInfoDecodeErrorZ _res_conv = *(LDKCResult_ChannelInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelInfoDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_Transaction_free(int8_tArray _res) {
-       LDKTransaction _res_ref;
-       _res_ref.datalen = *((uint32_t*)_res);
-       _res_ref.data = MALLOC(_res_ref.datalen, "LDKTransaction Bytes");
-       memcpy(_res_ref.data, (uint8_t*)(_res + 4), _res_ref.datalen);
-       _res_ref.data_is_owned = true;
-       Transaction_free(_res_ref);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelInfoDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelInfoDecodeErrorZ* orig_conv = (LDKCResult_ChannelInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = CResult_ChannelInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_TxOut_free(uint32_t _res) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_ok(uint32_t o) {
+       LDKRoutingFees o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = RoutingFees_clone(&o_conv);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKTxOut _res_conv = *(LDKTxOut*)(((uint64_t)_res) & ~1);
+       LDKCResult_RoutingFeesDecodeErrorZ _res_conv = *(LDKCResult_RoutingFeesDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       TxOut_free(_res_conv);
+       CResult_RoutingFeesDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_TxOut_clone(uint32_t orig) {
-       LDKTxOut* orig_conv = (LDKTxOut*)(orig & ~1);
-       LDKTxOut* ret_ref = MALLOC(sizeof(LDKTxOut), "LDKTxOut");
-       *ret_ref = TxOut_clone(orig_conv);
-       return (long)ret_ref;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_RoutingFeesDecodeErrorZ* orig_conv = (LDKCResult_RoutingFeesDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
+       *ret_conv = CResult_RoutingFeesDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_SpendableOutputDescriptorZ_free(uint32_tArray _res) {
-       LDKCVec_SpendableOutputDescriptorZ _res_constr;
+void  __attribute__((visibility("default"))) TS_CVec_NetAddressZ_free(uint32_tArray _res) {
+       LDKCVec_NetAddressZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNetAddress), "LDKCVec_NetAddressZ Elements");
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t b = 0; b < _res_constr.datalen; b++) {
-               uint32_t arr_conv_27 = _res_vals[b];
-               LDKSpendableOutputDescriptor arr_conv_27_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)arr_conv_27) & ~1);
-               FREE((void*)arr_conv_27);
-               _res_constr.data[b] = arr_conv_27_conv;
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               uint32_t _res_conv_12 = _res_vals[m];
+               LDKNetAddress _res_conv_12_conv = *(LDKNetAddress*)(((uint64_t)_res_conv_12) & ~1);
+               FREE((void*)_res_conv_12);
+               _res_constr.data[m] = _res_conv_12_conv;
        }
-       CVec_SpendableOutputDescriptorZ_free(_res_constr);
+       CVec_NetAddressZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_MessageSendEventZ_free(uint32_tArray _res) {
-       LDKCVec_MessageSendEventZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMessageSendEvent), "LDKCVec_MessageSendEventZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t s = 0; s < _res_constr.datalen; s++) {
-               uint32_t arr_conv_18 = _res_vals[s];
-               LDKMessageSendEvent arr_conv_18_conv = *(LDKMessageSendEvent*)(((uint64_t)arr_conv_18) & ~1);
-               FREE((void*)arr_conv_18);
-               _res_constr.data[s] = arr_conv_18_conv;
-       }
-       CVec_MessageSendEventZ_free(_res_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_ok(uint32_t o) {
+       LDKNodeAnnouncementInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeAnnouncementInfo_clone(&o_conv);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_EventZ_free(uint32_tArray _res) {
-       LDKCVec_EventZ _res_constr;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_u64Z_free(int64_tArray _res) {
+       LDKCVec_u64Z _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(int64_t), "LDKCVec_u64Z Elements");
        else
                _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t h = 0; h < _res_constr.datalen; h++) {
-               uint32_t arr_conv_7 = _res_vals[h];
-               LDKEvent arr_conv_7_conv = *(LDKEvent*)(((uint64_t)arr_conv_7) & ~1);
-               FREE((void*)arr_conv_7);
-               _res_constr.data[h] = arr_conv_7_conv;
+       int64_t* _res_vals = (int64_t*)(_res + 4);
+       for (size_t i = 0; i < _res_constr.datalen; i++) {
+               int64_t _res_conv_8 = _res_vals[i];
+               _res_constr.data[i] = _res_conv_8;
        }
-       CVec_EventZ_free(_res_constr);
+       CVec_u64Z_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_free(uint32_t _res) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_ok(uint32_t o) {
+       LDKNodeInfo o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NodeInfo_clone(&o_conv);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC2Tuple_usizeTransactionZ _res_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_NodeInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C2Tuple_usizeTransactionZ_free(_res_conv);
+       CResult_NodeInfoDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_NodeInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeInfoDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
+       *ret_conv = CResult_NodeInfoDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_ok(uint32_t o) {
+       LDKNetworkGraph o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = NetworkGraph_clone(&o_conv);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NetworkGraphDecodeErrorZ _res_conv = *(LDKCResult_NetworkGraphDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_NetworkGraphDecodeErrorZ* orig_conv = (LDKCResult_NetworkGraphDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
+       *ret_conv = CResult_NetworkGraphDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_new(int64_t a, int8_tArray b) {
@@ -4369,6 +6256,13 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_ne
        return (long)ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_C2Tuple_usizeTransactionZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_usizeTransactionZ _res_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_usizeTransactionZ_free(_res_conv);
+}
+
 void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_usizeTransactionZZ_free(uint32_tArray _res) {
        LDKCVec_C2Tuple_usizeTransactionZZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
@@ -4378,10 +6272,10 @@ void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_usizeTransactionZZ_
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
        for (size_t e = 0; e < _res_constr.datalen; e++) {
-               uint32_t arr_conv_30 = _res_vals[e];
-               LDKC2Tuple_usizeTransactionZ arr_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_conv_30) & ~1);
-               FREE((void*)arr_conv_30);
-               _res_constr.data[e] = arr_conv_30_conv;
+               uint32_t _res_conv_30 = _res_vals[e];
+               LDKC2Tuple_usizeTransactionZ _res_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)_res_conv_30) & ~1);
+               FREE((void*)_res_conv_30);
+               _res_constr.data[e] = _res_conv_30_conv;
        }
        CVec_C2Tuple_usizeTransactionZZ_free(_res_constr);
 }
@@ -4399,38 +6293,88 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneChannelMonitorUp
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NoneChannelMonitorUpdateErrZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_NoneChannelMonitorUpdateErrZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NoneChannelMonitorUpdateErrZ _res_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NoneChannelMonitorUpdateErrZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneChannelMonitorUpdateErrZ_clone(uint32_t orig) {
+       LDKCResult_NoneChannelMonitorUpdateErrZ* orig_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(orig & ~1);
+       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
+       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_MonitorEventZ_free(uint32_tArray _res) {
+       LDKCVec_MonitorEventZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t o = 0; o < _res_constr.datalen; o++) {
+               uint32_t _res_conv_14 = _res_vals[o];
+               LDKMonitorEvent _res_conv_14_conv = *(LDKMonitorEvent*)(((uint64_t)_res_conv_14) & ~1);
+               FREE((void*)_res_conv_14);
+               _res_constr.data[o] = _res_conv_14_conv;
+       }
+       CVec_MonitorEventZ_free(_res_constr);
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_EventZ_free(uint32_tArray _res) {
+       LDKCVec_EventZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKEvent), "LDKCVec_EventZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t h = 0; h < _res_constr.datalen; h++) {
+               uint32_t _res_conv_7 = _res_vals[h];
+               LDKEvent _res_conv_7_conv = *(LDKEvent*)(((uint64_t)_res_conv_7) & ~1);
+               FREE((void*)_res_conv_7);
+               _res_constr.data[h] = _res_conv_7_conv;
+       }
+       CVec_EventZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OutPointDecodeErrorZ_ok(uint32_t o) {
+       LDKOutPoint o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = OutPoint_clone(&o_conv);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OutPointDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_OutPointDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NoneChannelMonitorUpdateErrZ _res_conv = *(LDKCResult_NoneChannelMonitorUpdateErrZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_OutPointDecodeErrorZ _res_conv = *(LDKCResult_OutPointDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NoneChannelMonitorUpdateErrZ_free(_res_conv);
+       CResult_OutPointDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneChannelMonitorUpdateErrZ_clone(uint32_t orig) {
-       LDKCResult_NoneChannelMonitorUpdateErrZ* orig_conv = (LDKCResult_NoneChannelMonitorUpdateErrZ*)(orig & ~1);
-       LDKCResult_NoneChannelMonitorUpdateErrZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneChannelMonitorUpdateErrZ), "LDKCResult_NoneChannelMonitorUpdateErrZ");
-       *ret_conv = CResult_NoneChannelMonitorUpdateErrZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OutPointDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_OutPointDecodeErrorZ* orig_conv = (LDKCResult_OutPointDecodeErrorZ*)(orig & ~1);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = CResult_OutPointDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_MonitorEventZ_free(uint32_tArray _res) {
-       LDKCVec_MonitorEventZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKMonitorEvent), "LDKCVec_MonitorEventZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t o = 0; o < _res_constr.datalen; o++) {
-               uint32_t arr_conv_14 = _res_vals[o];
-               LDKMonitorEvent arr_conv_14_conv;
-               arr_conv_14_conv.inner = (void*)(arr_conv_14 & (~1));
-               arr_conv_14_conv.is_owned = (arr_conv_14 & 1) || (arr_conv_14 == 0);
-               _res_constr.data[o] = arr_conv_14_conv;
-       }
-       CVec_MonitorEventZ_free(_res_constr);
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_ok(uint32_t o) {
        LDKChannelMonitorUpdate o_conv;
        o_conv.inner = (void*)(o & (~1));
@@ -4458,6 +6402,47 @@ void  __attribute__((visibility("default"))) TS_CResult_ChannelMonitorUpdateDeco
        CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelMonitorUpdateDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* orig_conv = (LDKCResult_ChannelMonitorUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelMonitorUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelMonitorUpdateDecodeErrorZ), "LDKCResult_ChannelMonitorUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCUpdateDecodeErrorZ_ok(uint32_t o) {
+       LDKHTLCUpdate o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = HTLCUpdate_clone(&o_conv);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCUpdateDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_HTLCUpdateDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_HTLCUpdateDecodeErrorZ _res_conv = *(LDKCResult_HTLCUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_HTLCUpdateDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_HTLCUpdateDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_HTLCUpdateDecodeErrorZ* orig_conv = (LDKCResult_HTLCUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = CResult_HTLCUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneMonitorUpdateErrorZ_ok() {
        LDKCResult_NoneMonitorUpdateErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneMonitorUpdateErrorZ), "LDKCResult_NoneMonitorUpdateErrorZ");
        *ret_conv = CResult_NoneMonitorUpdateErrorZ_ok();
@@ -4488,11 +6473,11 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneMonitorUpdateErr
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_OutPointScriptZ _res_conv = *(LDKC2Tuple_OutPointScriptZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_OutPointScriptZ_free(_res_conv);
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_clone(uint32_t orig) {
+       LDKC2Tuple_OutPointScriptZ* orig_conv = (LDKC2Tuple_OutPointScriptZ*)(orig & ~1);
+       LDKC2Tuple_OutPointScriptZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_OutPointScriptZ), "LDKC2Tuple_OutPointScriptZ");
+       *ret_ref = C2Tuple_OutPointScriptZ_clone(orig_conv);
+       return (long)ret_ref;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_new(uint32_t a, int8_tArray b) {
@@ -4509,174 +6494,378 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_new(
        return (long)ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_TransactionZ_free(ptrArray _res) {
-       LDKCVec_TransactionZ _res_constr;
+void  __attribute__((visibility("default"))) TS_C2Tuple_OutPointScriptZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_OutPointScriptZ _res_conv = *(LDKC2Tuple_OutPointScriptZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_OutPointScriptZ_free(_res_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_TransactionZ_free(ptrArray _res) {
+       LDKCVec_TransactionZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       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 = (int8_tArray*)(_res + 4);
+       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 = *((uint32_t*)_res_conv_12);
+               _res_conv_12_ref.data = MALLOC(_res_conv_12_ref.datalen, "LDKTransaction Bytes");
+               memcpy(_res_conv_12_ref.data, (uint8_t*)(_res_conv_12 + 4), _res_conv_12_ref.datalen);
+               _res_conv_12_ref.data_is_owned = true;
+               _res_constr.data[m] = _res_conv_12_ref;
+       }
+       CVec_TransactionZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_clone(uint32_t orig) {
+       LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
+       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
+       return (long)ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_new(int32_t a, uint32_t b) {
+       LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
+       FREE((void*)b);
+       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
+       *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
+       return (long)ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_u32TxOutZ _res_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_u32TxOutZ_free(_res_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_u32TxOutZZ_free(uint32_tArray _res) {
+       LDKCVec_C2Tuple_u32TxOutZZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t z = 0; z < _res_constr.datalen; z++) {
+               uint32_t _res_conv_25 = _res_vals[z];
+               LDKC2Tuple_u32TxOutZ _res_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res_conv_25) & ~1);
+               FREE((void*)_res_conv_25);
+               _res_constr.data[z] = _res_conv_25_conv;
+       }
+       CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(int8_tArray a, uint32_tArray b) {
+       LDKThirtyTwoBytes a_ref;
+       CHECK(*((uint32_t*)a) == 32);
+       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
+       LDKCVec_C2Tuple_u32TxOutZZ b_constr;
+       b_constr.datalen = *((uint32_t*)b);
+       if (b_constr.datalen > 0)
+               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
+       else
+               b_constr.data = NULL;
+       uint32_t* b_vals = (uint32_t*)(b + 4);
+       for (size_t z = 0; z < b_constr.datalen; z++) {
+               uint32_t b_conv_25 = b_vals[z];
+               LDKC2Tuple_u32TxOutZ b_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)b_conv_25) & ~1);
+               FREE((void*)b_conv_25);
+               b_constr.data[z] = b_conv_25_conv;
+       }
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
+       return (long)ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(uint32_tArray _res) {
+       LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t x = 0; x < _res_constr.datalen; x++) {
+               uint32_t _res_conv_49 = _res_vals[x];
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv_49_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res_conv_49) & ~1);
+               FREE((void*)_res_conv_49);
+               _res_constr.data[x] = _res_conv_49_conv;
+       }
+       CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_new(int8_tArray a, uint32_t b) {
+       LDKThirtyTwoBytes a_ref;
+       CHECK(*((uint32_t*)a) == 32);
+       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
+       LDKChannelMonitor b_conv;
+       b_conv.inner = (void*)(b & (~1));
+       b_conv.is_owned = (b & 1) || (b == 0);
+       b_conv = ChannelMonitor_clone(&b_conv);
+       LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
+       *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+       return (long)ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_BlockHashChannelMonitorZ _res_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_BlockHashChannelMonitorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(uint32_t o) {
+       LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
+       FREE((void*)o);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_SpendableOutputDescriptorZ_free(uint32_tArray _res) {
+       LDKCVec_SpendableOutputDescriptorZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t b = 0; b < _res_constr.datalen; b++) {
+               uint32_t _res_conv_27 = _res_vals[b];
+               LDKSpendableOutputDescriptor _res_conv_27_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)_res_conv_27) & ~1);
+               FREE((void*)_res_conv_27);
+               _res_constr.data[b] = _res_conv_27_conv;
+       }
+       CVec_SpendableOutputDescriptorZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_ok(uint32_t o) {
+       LDKTxOut o_conv = *(LDKTxOut*)(((uint64_t)o) & ~1);
+       FREE((void*)o);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_err(uint32_t e) {
+       LDKAccessError e_conv = LDKAccessError_from_js(e);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_TxOutAccessErrorZ _res_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_TxOutAccessErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_clone(uint32_t orig) {
+       LDKCResult_TxOutAccessErrorZ* orig_conv = (LDKCResult_TxOutAccessErrorZ*)(orig & ~1);
+       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
+       *ret_conv = CResult_TxOutAccessErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_ok() {
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_ok();
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_err(uint32_t e) {
+       LDKAPIError e_conv = *(LDKAPIError*)(((uint64_t)e) & ~1);
+       FREE((void*)e);
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_NoneAPIErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_clone(uint32_t orig) {
+       LDKCResult_NoneAPIErrorZ* orig_conv = (LDKCResult_NoneAPIErrorZ*)(orig & ~1);
+       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
+       *ret_conv = CResult_NoneAPIErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_CResult_NoneAPIErrorZZ_free(uint32_tArray _res) {
+       LDKCVec_CResult_NoneAPIErrorZZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTransaction), "LDKCVec_TransactionZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCResult_NoneAPIErrorZ), "LDKCVec_CResult_NoneAPIErrorZZ Elements");
        else
                _res_constr.data = NULL;
-       int8_tArray* _res_vals = (int8_tArray*)(_res + 4);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = _res_vals[m];
-               LDKTransaction arr_conv_12_ref;
-               arr_conv_12_ref.datalen = *((uint32_t*)arr_conv_12);
-               arr_conv_12_ref.data = MALLOC(arr_conv_12_ref.datalen, "LDKTransaction Bytes");
-               memcpy(arr_conv_12_ref.data, (uint8_t*)(arr_conv_12 + 4), arr_conv_12_ref.datalen);
-               arr_conv_12_ref.data_is_owned = true;
-               _res_constr.data[m] = arr_conv_12_ref;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t w = 0; w < _res_constr.datalen; w++) {
+               uint32_t _res_conv_22 = _res_vals[w];
+               LDKCResult_NoneAPIErrorZ _res_conv_22_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)_res_conv_22) & ~1);
+               FREE((void*)_res_conv_22);
+               _res_constr.data[w] = _res_conv_22_conv;
        }
-       CVec_TransactionZ_free(_res_constr);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_clone(uint32_t orig) {
-       LDKC2Tuple_u32TxOutZ* orig_conv = (LDKC2Tuple_u32TxOutZ*)(orig & ~1);
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_clone(orig_conv);
-       return (long)ret_ref;
-}
-
-void  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_u32TxOutZ _res_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_u32TxOutZ_free(_res_conv);
+       CVec_CResult_NoneAPIErrorZZ_free(_res_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u32TxOutZ_new(int32_t a, uint32_t b) {
-       LDKTxOut b_conv = *(LDKTxOut*)(((uint64_t)b) & ~1);
-       FREE((void*)b);
-       LDKC2Tuple_u32TxOutZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_u32TxOutZ), "LDKC2Tuple_u32TxOutZ");
-       *ret_ref = C2Tuple_u32TxOutZ_new(a, b_conv);
-       return (long)ret_ref;
+void  __attribute__((visibility("default"))) TS_CVec_APIErrorZ_free(uint32_tArray _res) {
+       LDKCVec_APIErrorZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKAPIError), "LDKCVec_APIErrorZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t k = 0; k < _res_constr.datalen; k++) {
+               uint32_t _res_conv_10 = _res_vals[k];
+               LDKAPIError _res_conv_10_conv = *(LDKAPIError*)(((uint64_t)_res_conv_10) & ~1);
+               FREE((void*)_res_conv_10);
+               _res_constr.data[k] = _res_conv_10_conv;
+       }
+       CVec_APIErrorZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_u32TxOutZZ_free(uint32_tArray _res) {
-       LDKCVec_C2Tuple_u32TxOutZZ _res_constr;
+void  __attribute__((visibility("default"))) TS_CVec_ChannelDetailsZ_free(uint32_tArray _res) {
+       LDKCVec_ChannelDetailsZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelDetails), "LDKCVec_ChannelDetailsZ Elements");
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t z = 0; z < _res_constr.datalen; z++) {
-               uint32_t arr_conv_25 = _res_vals[z];
-               LDKC2Tuple_u32TxOutZ arr_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)arr_conv_25) & ~1);
-               FREE((void*)arr_conv_25);
-               _res_constr.data[z] = arr_conv_25_conv;
+       for (size_t q = 0; q < _res_constr.datalen; q++) {
+               uint32_t _res_conv_16 = _res_vals[q];
+               LDKChannelDetails _res_conv_16_conv;
+               _res_conv_16_conv.inner = (void*)(_res_conv_16 & (~1));
+               _res_conv_16_conv.is_owned = (_res_conv_16 & 1) || (_res_conv_16 == 0);
+               _res_constr.data[q] = _res_conv_16_conv;
        }
-       CVec_C2Tuple_u32TxOutZZ_free(_res_constr);
+       CVec_ChannelDetailsZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(uint32_t _res) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_ok() {
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_ok();
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_err(uint32_t e) {
+       LDKPaymentSendFailure e_conv = *(LDKPaymentSendFailure*)(((uint64_t)e) & ~1);
+       FREE((void*)e);
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_NonePaymentSendFailureZ _res_conv = *(LDKCResult_NonePaymentSendFailureZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res_conv);
+       CResult_NonePaymentSendFailureZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(int8_tArray a, uint32_tArray b) {
-       LDKThirtyTwoBytes a_ref;
-       CHECK(*((uint32_t*)a) == 32);
-       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
-       LDKCVec_C2Tuple_u32TxOutZZ b_constr;
-       b_constr.datalen = *((uint32_t*)b);
-       if (b_constr.datalen > 0)
-               b_constr.data = MALLOC(b_constr.datalen * sizeof(LDKC2Tuple_u32TxOutZ), "LDKCVec_C2Tuple_u32TxOutZZ Elements");
-       else
-               b_constr.data = NULL;
-       uint32_t* b_vals = (uint32_t*)(b + 4);
-       for (size_t z = 0; z < b_constr.datalen; z++) {
-               uint32_t arr_conv_25 = b_vals[z];
-               LDKC2Tuple_u32TxOutZ arr_conv_25_conv = *(LDKC2Tuple_u32TxOutZ*)(((uint64_t)arr_conv_25) & ~1);
-               FREE((void*)arr_conv_25);
-               b_constr.data[z] = arr_conv_25_conv;
-       }
-       LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-       *ret_ref = C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a_ref, b_constr);
-       return (long)ret_ref;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_clone(uint32_t orig) {
+       LDKCResult_NonePaymentSendFailureZ* orig_conv = (LDKCResult_NonePaymentSendFailureZ*)(orig & ~1);
+       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
+       *ret_conv = CResult_NonePaymentSendFailureZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(uint32_tArray _res) {
-       LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res_constr;
+void  __attribute__((visibility("default"))) TS_CVec_ChannelMonitorZ_free(uint32_tArray _res) {
+       LDKCVec_ChannelMonitorZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelMonitor), "LDKCVec_ChannelMonitorZ Elements");
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t x = 0; x < _res_constr.datalen; x++) {
-               uint32_t arr_conv_49 = _res_vals[x];
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ arr_conv_49_conv = *(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ*)(((uint64_t)arr_conv_49) & ~1);
-               FREE((void*)arr_conv_49);
-               _res_constr.data[x] = arr_conv_49_conv;
+       for (size_t q = 0; q < _res_constr.datalen; q++) {
+               uint32_t _res_conv_16 = _res_vals[q];
+               LDKChannelMonitor _res_conv_16_conv;
+               _res_conv_16_conv.inner = (void*)(_res_conv_16 & (~1));
+               _res_conv_16_conv.is_owned = (_res_conv_16 & 1) || (_res_conv_16 == 0);
+               _res_constr.data[q] = _res_conv_16_conv;
        }
-       CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res_constr);
-}
-
-void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_BlockHashChannelMonitorZ _res_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_BlockHashChannelMonitorZ_free(_res_conv);
+       CVec_ChannelMonitorZ_free(_res_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelMonitorZ_new(int8_tArray a, uint32_t b) {
+uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_new(int8_tArray a, uint32_t b) {
        LDKThirtyTwoBytes a_ref;
        CHECK(*((uint32_t*)a) == 32);
        memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
-       LDKChannelMonitor b_conv;
+       LDKChannelManager b_conv;
        b_conv.inner = (void*)(b & (~1));
        b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelMonitor_clone(&b_conv);
-       LDKC2Tuple_BlockHashChannelMonitorZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelMonitorZ), "LDKC2Tuple_BlockHashChannelMonitorZ");
-       *ret_ref = C2Tuple_BlockHashChannelMonitorZ_new(a_ref, b_conv);
+       // Warning: we need a move here but no clone is available for LDKChannelManager
+       LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
+       *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
        return (long)ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(uint32_t o) {
-       LDKC2Tuple_BlockHashChannelMonitorZ o_conv = *(LDKC2Tuple_BlockHashChannelMonitorZ*)(((uint64_t)o) & ~1);
+void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_BlockHashChannelManagerZ _res_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_BlockHashChannelManagerZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(uint32_t o) {
+       LDKC2Tuple_BlockHashChannelManagerZ o_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)o) & ~1);
        FREE((void*)o);
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o_conv);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e_conv);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
+       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u64u64Z_clone(uint32_t orig) {
-       LDKC2Tuple_u64u64Z* orig_conv = (LDKC2Tuple_u64u64Z*)(orig & ~1);
-       LDKC2Tuple_u64u64Z* ret_ref = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       *ret_ref = C2Tuple_u64u64Z_clone(orig_conv);
-       return (long)ret_ref;
-}
-
-void  __attribute__((visibility("default"))) TS_C2Tuple_u64u64Z_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC2Tuple_u64u64Z _res_conv = *(LDKC2Tuple_u64u64Z*)(((uint64_t)_res) & ~1);
+       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C2Tuple_u64u64Z_free(_res_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_u64u64Z_new(int64_t a, int64_t b) {
-       LDKC2Tuple_u64u64Z* ret_ref = MALLOC(sizeof(LDKC2Tuple_u64u64Z), "LDKC2Tuple_u64u64Z");
-       *ret_ref = C2Tuple_u64u64Z_new(a, b);
-       return (long)ret_ref;
+       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_CResult_SpendableOutputDescriptorDecodeErrorZ_ok(uint32_t o) {
@@ -4711,24 +6900,6 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_SpendableOutputDescr
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_SignatureZ_free(ptrArray _res) {
-       LDKCVec_SignatureZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
-       else
-               _res_constr.data = NULL;
-       int8_tArray* _res_vals = (int8_tArray*)(_res + 4);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = _res_vals[m];
-               LDKSignature arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 64);
-               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
-               _res_constr.data[m] = arr_conv_12_ref;
-       }
-       CVec_SignatureZ_free(_res_constr);
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_clone(uint32_t orig) {
        LDKC2Tuple_SignatureCVec_SignatureZZ* orig_conv = (LDKC2Tuple_SignatureCVec_SignatureZZ*)(orig & ~1);
        LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
@@ -4736,13 +6907,6 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_Signat
        return (long)ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_SignatureCVec_SignatureZZ _res_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_SignatureCVec_SignatureZZ_free(_res_conv);
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_new(int8_tArray a, ptrArray b) {
        LDKSignature a_ref;
        CHECK(*((uint32_t*)a) == 64);
@@ -4755,17 +6919,24 @@ uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_Signat
                b_constr.data = NULL;
        int8_tArray* b_vals = (int8_tArray*)(b + 4);
        for (size_t m = 0; m < b_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = b_vals[m];
-               LDKSignature arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 64);
-               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
-               b_constr.data[m] = arr_conv_12_ref;
+               int8_tArray b_conv_12 = b_vals[m];
+               LDKSignature b_conv_12_ref;
+               CHECK(*((uint32_t*)b_conv_12) == 64);
+               memcpy(b_conv_12_ref.compact_form, (uint8_t*)(b_conv_12 + 4), 64);
+               b_constr.data[m] = b_conv_12_ref;
        }
        LDKC2Tuple_SignatureCVec_SignatureZZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_SignatureCVec_SignatureZZ), "LDKC2Tuple_SignatureCVec_SignatureZZ");
        *ret_ref = C2Tuple_SignatureCVec_SignatureZZ_new(a_ref, b_constr);
        return (long)ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_C2Tuple_SignatureCVec_SignatureZZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKC2Tuple_SignatureCVec_SignatureZZ _res_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       C2Tuple_SignatureCVec_SignatureZZ_free(_res_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(uint32_t o) {
        LDKC2Tuple_SignatureCVec_SignatureZZ o_conv = *(LDKC2Tuple_SignatureCVec_SignatureZZ*)(((uint64_t)o) & ~1);
        FREE((void*)o);
@@ -4823,240 +6994,303 @@ uint32_t  __attribute__((visibility("default"))) TS_CResult_SignatureNoneZ_clone
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ChanKeySignerDecodeErrorZ_ok(uint32_t o) {
-       LDKChannelKeys o_conv = *(LDKChannelKeys*)(((uint64_t)o) & ~1);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_ok(o_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_SignDecodeErrorZ_ok(uint32_t o) {
+       LDKSign o_conv = *(LDKSign*)(((uint64_t)o) & ~1);
+       LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
+       *ret_conv = CResult_SignDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ChanKeySignerDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_SignDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_err(e_conv);
+       LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
+       *ret_conv = CResult_SignDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_ChanKeySignerDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_SignDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ChanKeySignerDecodeErrorZ _res_conv = *(LDKCResult_ChanKeySignerDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_SignDecodeErrorZ _res_conv = *(LDKCResult_SignDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ChanKeySignerDecodeErrorZ_free(_res_conv);
+       CResult_SignDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ChanKeySignerDecodeErrorZ_clone(uint32_t orig) {
-       LDKCResult_ChanKeySignerDecodeErrorZ* orig_conv = (LDKCResult_ChanKeySignerDecodeErrorZ*)(orig & ~1);
-       LDKCResult_ChanKeySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChanKeySignerDecodeErrorZ), "LDKCResult_ChanKeySignerDecodeErrorZ");
-       *ret_conv = CResult_ChanKeySignerDecodeErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_SignDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_SignDecodeErrorZ* orig_conv = (LDKCResult_SignDecodeErrorZ*)(orig & ~1);
+       LDKCResult_SignDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SignDecodeErrorZ), "LDKCResult_SignDecodeErrorZ");
+       *ret_conv = CResult_SignDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_InMemoryChannelKeysDecodeErrorZ_ok(uint32_t o) {
-       LDKInMemoryChannelKeys o_conv;
-       o_conv.inner = (void*)(o & (~1));
-       o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = InMemoryChannelKeys_clone(&o_conv);
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ), "LDKCResult_InMemoryChannelKeysDecodeErrorZ");
-       *ret_conv = CResult_InMemoryChannelKeysDecodeErrorZ_ok(o_conv);
+void  __attribute__((visibility("default"))) TS_CVec_CVec_u8ZZ_free(ptrArray _res) {
+       LDKCVec_CVec_u8ZZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_u8Z), "LDKCVec_CVec_u8ZZ Elements");
+       else
+               _res_constr.data = NULL;
+       int8_tArray* _res_vals = (int8_tArray*)(_res + 4);
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               int8_tArray _res_conv_12 = _res_vals[m];
+               LDKCVec_u8Z _res_conv_12_ref;
+               _res_conv_12_ref.datalen = *((uint32_t*)_res_conv_12);
+               _res_conv_12_ref.data = MALLOC(_res_conv_12_ref.datalen, "LDKCVec_u8Z Bytes");
+               memcpy(_res_conv_12_ref.data, (uint8_t*)(_res_conv_12 + 4), _res_conv_12_ref.datalen);
+               _res_constr.data[m] = _res_conv_12_ref;
+       }
+       CVec_CVec_u8ZZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_CVec_u8ZZNoneZ_ok(ptrArray o) {
+       LDKCVec_CVec_u8ZZ o_constr;
+       o_constr.datalen = *((uint32_t*)o);
+       if (o_constr.datalen > 0)
+               o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKCVec_u8Z), "LDKCVec_CVec_u8ZZ Elements");
+       else
+               o_constr.data = NULL;
+       int8_tArray* o_vals = (int8_tArray*)(o + 4);
+       for (size_t m = 0; m < o_constr.datalen; m++) {
+               int8_tArray o_conv_12 = o_vals[m];
+               LDKCVec_u8Z o_conv_12_ref;
+               o_conv_12_ref.datalen = *((uint32_t*)o_conv_12);
+               o_conv_12_ref.data = MALLOC(o_conv_12_ref.datalen, "LDKCVec_u8Z Bytes");
+               memcpy(o_conv_12_ref.data, (uint8_t*)(o_conv_12 + 4), o_conv_12_ref.datalen);
+               o_constr.data[m] = o_conv_12_ref;
+       }
+       LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+       *ret_conv = CResult_CVec_CVec_u8ZZNoneZ_ok(o_constr);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_InMemoryChannelKeysDecodeErrorZ_err(uint32_t e) {
-       LDKDecodeError e_conv;
-       e_conv.inner = (void*)(e & (~1));
-       e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ), "LDKCResult_InMemoryChannelKeysDecodeErrorZ");
-       *ret_conv = CResult_InMemoryChannelKeysDecodeErrorZ_err(e_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_CVec_u8ZZNoneZ_err() {
+       LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+       *ret_conv = CResult_CVec_CVec_u8ZZNoneZ_err();
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_InMemoryChannelKeysDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_CVec_CVec_u8ZZNoneZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ _res_conv = *(LDKCResult_InMemoryChannelKeysDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_CVec_CVec_u8ZZNoneZ _res_conv = *(LDKCResult_CVec_CVec_u8ZZNoneZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_InMemoryChannelKeysDecodeErrorZ_free(_res_conv);
+       CResult_CVec_CVec_u8ZZNoneZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_ok(uint32_t o) {
-       LDKTxOut o_conv = *(LDKTxOut*)(((uint64_t)o) & ~1);
-       FREE((void*)o);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_ok(o_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_CVec_u8ZZNoneZ_clone(uint32_t orig) {
+       LDKCResult_CVec_CVec_u8ZZNoneZ* orig_conv = (LDKCResult_CVec_CVec_u8ZZNoneZ*)(orig & ~1);
+       LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+       *ret_conv = CResult_CVec_CVec_u8ZZNoneZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_err(uint32_t e) {
-       LDKAccessError e_conv = LDKAccessError_from_js(e);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_err(e_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InMemorySignerDecodeErrorZ_ok(uint32_t o) {
+       LDKInMemorySigner o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = InMemorySigner_clone(&o_conv);
+       LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
+       *ret_conv = CResult_InMemorySignerDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_free(uint32_t _res) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InMemorySignerDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
+       *ret_conv = CResult_InMemorySignerDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_InMemorySignerDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_TxOutAccessErrorZ _res_conv = *(LDKCResult_TxOutAccessErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_InMemorySignerDecodeErrorZ _res_conv = *(LDKCResult_InMemorySignerDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_TxOutAccessErrorZ_free(_res_conv);
+       CResult_InMemorySignerDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TxOutAccessErrorZ_clone(uint32_t orig) {
-       LDKCResult_TxOutAccessErrorZ* orig_conv = (LDKCResult_TxOutAccessErrorZ*)(orig & ~1);
-       LDKCResult_TxOutAccessErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxOutAccessErrorZ), "LDKCResult_TxOutAccessErrorZ");
-       *ret_conv = CResult_TxOutAccessErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InMemorySignerDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_InMemorySignerDecodeErrorZ* orig_conv = (LDKCResult_InMemorySignerDecodeErrorZ*)(orig & ~1);
+       LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
+       *ret_conv = CResult_InMemorySignerDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_ok() {
-       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = CResult_NoneAPIErrorZ_ok();
+void  __attribute__((visibility("default"))) TS_CVec_TxOutZ_free(uint32_tArray _res) {
+       LDKCVec_TxOutZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t h = 0; h < _res_constr.datalen; h++) {
+               uint32_t _res_conv_7 = _res_vals[h];
+               LDKTxOut _res_conv_7_conv = *(LDKTxOut*)(((uint64_t)_res_conv_7) & ~1);
+               FREE((void*)_res_conv_7);
+               _res_constr.data[h] = _res_conv_7_conv;
+       }
+       CVec_TxOutZ_free(_res_constr);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TransactionNoneZ_ok(int8_tArray o) {
+       LDKTransaction o_ref;
+       o_ref.datalen = *((uint32_t*)o);
+       o_ref.data = MALLOC(o_ref.datalen, "LDKTransaction Bytes");
+       memcpy(o_ref.data, (uint8_t*)(o + 4), o_ref.datalen);
+       o_ref.data_is_owned = true;
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = CResult_TransactionNoneZ_ok(o_ref);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_err(uint32_t e) {
-       LDKAPIError e_conv = *(LDKAPIError*)(((uint64_t)e) & ~1);
-       FREE((void*)e);
-       LDKCResult_NoneAPIErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneAPIErrorZ), "LDKCResult_NoneAPIErrorZ");
-       *ret_conv = CResult_NoneAPIErrorZ_err(e_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_TransactionNoneZ_err() {
+       LDKCResult_TransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TransactionNoneZ), "LDKCResult_TransactionNoneZ");
+       *ret_conv = CResult_TransactionNoneZ_err();
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NoneAPIErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_TransactionNoneZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NoneAPIErrorZ _res_conv = *(LDKCResult_NoneAPIErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_TransactionNoneZ _res_conv = *(LDKCResult_TransactionNoneZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NoneAPIErrorZ_free(_res_conv);
+       CResult_TransactionNoneZ_free(_res_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_CVec_RouteHopZ_free(uint32_tArray _res) {
+       LDKCVec_RouteHopZ _res_constr;
+       _res_constr.datalen = *((uint32_t*)_res);
+       if (_res_constr.datalen > 0)
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+       else
+               _res_constr.data = NULL;
+       uint32_t* _res_vals = (uint32_t*)(_res + 4);
+       for (size_t k = 0; k < _res_constr.datalen; k++) {
+               uint32_t _res_conv_10 = _res_vals[k];
+               LDKRouteHop _res_conv_10_conv;
+               _res_conv_10_conv.inner = (void*)(_res_conv_10 & (~1));
+               _res_conv_10_conv.is_owned = (_res_conv_10 & 1) || (_res_conv_10 == 0);
+               _res_constr.data[k] = _res_conv_10_conv;
+       }
+       CVec_RouteHopZ_free(_res_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_ChannelDetailsZ_free(uint32_tArray _res) {
-       LDKCVec_ChannelDetailsZ _res_constr;
+void  __attribute__((visibility("default"))) TS_CVec_CVec_RouteHopZZ_free(ptrArray _res) {
+       LDKCVec_CVec_RouteHopZZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelDetails), "LDKCVec_ChannelDetailsZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_RouteHopZ), "LDKCVec_CVec_RouteHopZZ Elements");
        else
                _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t q = 0; q < _res_constr.datalen; q++) {
-               uint32_t arr_conv_16 = _res_vals[q];
-               LDKChannelDetails arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               _res_constr.data[q] = arr_conv_16_conv;
+       uint32_tArray* _res_vals = (uint32_tArray*)(_res + 4);
+       for (size_t m = 0; m < _res_constr.datalen; m++) {
+               uint32_tArray _res_conv_12 = _res_vals[m];
+               LDKCVec_RouteHopZ _res_conv_12_constr;
+               _res_conv_12_constr.datalen = *((uint32_t*)_res_conv_12);
+               if (_res_conv_12_constr.datalen > 0)
+                       _res_conv_12_constr.data = MALLOC(_res_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+               else
+                       _res_conv_12_constr.data = NULL;
+               uint32_t* _res_conv_12_vals = (uint32_t*)(_res_conv_12 + 4);
+               for (size_t k = 0; k < _res_conv_12_constr.datalen; k++) {
+                       uint32_t _res_conv_12_conv_10 = _res_conv_12_vals[k];
+                       LDKRouteHop _res_conv_12_conv_10_conv;
+                       _res_conv_12_conv_10_conv.inner = (void*)(_res_conv_12_conv_10 & (~1));
+                       _res_conv_12_conv_10_conv.is_owned = (_res_conv_12_conv_10 & 1) || (_res_conv_12_conv_10 == 0);
+                       _res_conv_12_constr.data[k] = _res_conv_12_conv_10_conv;
+               }
+               _res_constr.data[m] = _res_conv_12_constr;
        }
-       CVec_ChannelDetailsZ_free(_res_constr);
+       CVec_CVec_RouteHopZZ_free(_res_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_ok() {
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_ok();
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_ok(uint32_t o) {
+       LDKRoute o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Route_clone(&o_conv);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_err(uint32_t e) {
-       LDKPaymentSendFailure e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PaymentSendFailure_clone(&e_conv);
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NonePaymentSendFailureZ _res_conv = *(LDKCResult_NonePaymentSendFailureZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RouteDecodeErrorZ _res_conv = *(LDKCResult_RouteDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NonePaymentSendFailureZ_free(_res_conv);
+       CResult_RouteDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePaymentSendFailureZ_clone(uint32_t orig) {
-       LDKCResult_NonePaymentSendFailureZ* orig_conv = (LDKCResult_NonePaymentSendFailureZ*)(orig & ~1);
-       LDKCResult_NonePaymentSendFailureZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePaymentSendFailureZ), "LDKCResult_NonePaymentSendFailureZ");
-       *ret_conv = CResult_NonePaymentSendFailureZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_RouteDecodeErrorZ* orig_conv = (LDKCResult_RouteDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
+       *ret_conv = CResult_RouteDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_NetAddressZ_free(uint32_tArray _res) {
-       LDKCVec_NetAddressZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNetAddress), "LDKCVec_NetAddressZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               uint32_t arr_conv_12 = _res_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               _res_constr.data[m] = arr_conv_12_conv;
-       }
-       CVec_NetAddressZ_free(_res_constr);
-}
-
-void  __attribute__((visibility("default"))) TS_CVec_ChannelMonitorZ_free(uint32_tArray _res) {
-       LDKCVec_ChannelMonitorZ _res_constr;
+void  __attribute__((visibility("default"))) TS_CVec_RouteHintZ_free(uint32_tArray _res) {
+       LDKCVec_RouteHintZ _res_constr;
        _res_constr.datalen = *((uint32_t*)_res);
        if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKChannelMonitor), "LDKCVec_ChannelMonitorZ Elements");
+               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHint), "LDKCVec_RouteHintZ Elements");
        else
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t q = 0; q < _res_constr.datalen; q++) {
-               uint32_t arr_conv_16 = _res_vals[q];
-               LDKChannelMonitor arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               _res_constr.data[q] = arr_conv_16_conv;
+       for (size_t l = 0; l < _res_constr.datalen; l++) {
+               uint32_t _res_conv_11 = _res_vals[l];
+               LDKRouteHint _res_conv_11_conv;
+               _res_conv_11_conv.inner = (void*)(_res_conv_11 & (~1));
+               _res_conv_11_conv.is_owned = (_res_conv_11 & 1) || (_res_conv_11 == 0);
+               _res_constr.data[l] = _res_conv_11_conv;
        }
-       CVec_ChannelMonitorZ_free(_res_constr);
-}
-
-void  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKC2Tuple_BlockHashChannelManagerZ _res_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       C2Tuple_BlockHashChannelManagerZ_free(_res_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_C2Tuple_BlockHashChannelManagerZ_new(int8_tArray a, uint32_t b) {
-       LDKThirtyTwoBytes a_ref;
-       CHECK(*((uint32_t*)a) == 32);
-       memcpy(a_ref.data, (uint8_t*)(a + 4), 32);
-       LDKChannelManager b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelManager
-       LDKC2Tuple_BlockHashChannelManagerZ* ret_ref = MALLOC(sizeof(LDKC2Tuple_BlockHashChannelManagerZ), "LDKC2Tuple_BlockHashChannelManagerZ");
-       *ret_ref = C2Tuple_BlockHashChannelManagerZ_new(a_ref, b_conv);
-       return (long)ret_ref;
+       CVec_RouteHintZ_free(_res_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(uint32_t o) {
-       LDKC2Tuple_BlockHashChannelManagerZ o_conv = *(LDKC2Tuple_BlockHashChannelManagerZ*)(((uint64_t)o) & ~1);
-       FREE((void*)o);
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_ok(uint32_t o) {
+       LDKRoute o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Route_clone(&o_conv);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(uint32_t e) {
-       LDKDecodeError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_err(uint32_t e) {
+       LDKLightningError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ), "LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ");
-       *ret_conv = CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e_conv);
+       e_conv = LightningError_clone(&e_conv);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res_conv = *(LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RouteLightningErrorZ _res_conv = *(LDKCResult_RouteLightningErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res_conv);
+       CResult_RouteLightningErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_clone(uint32_t orig) {
+       LDKCResult_RouteLightningErrorZ* orig_conv = (LDKCResult_RouteLightningErrorZ*)(orig & ~1);
+       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
+       *ret_conv = CResult_RouteLightningErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_CResult_NetAddressu8Z_ok(uint32_t o) {
@@ -5112,19 +7346,11 @@ void  __attribute__((visibility("default"))) TS_CResult_CResult_NetAddressu8ZDec
        CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_u64Z_free(int64_tArray _res) {
-       LDKCVec_u64Z _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(int64_t), "LDKCVec_u64Z Elements");
-       else
-               _res_constr.data = NULL;
-       int64_t* _res_vals = (int64_t*)(_res + 4);
-       for (size_t i = 0; i < _res_constr.datalen; i++) {
-               int64_t arr_conv_8 = _res_vals[i];
-               _res_constr.data[i] = arr_conv_8;
-       }
-       CVec_u64Z_free(_res_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* orig_conv = (LDKCResult_CResult_NetAddressu8ZDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CResult_NetAddressu8ZDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CResult_NetAddressu8ZDecodeErrorZ), "LDKCResult_CResult_NetAddressu8ZDecodeErrorZ");
+       *ret_conv = CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_CVec_UpdateAddHTLCZ_free(uint32_tArray _res) {
@@ -5136,11 +7362,11 @@ void  __attribute__((visibility("default"))) TS_CVec_UpdateAddHTLCZ_free(uint32_
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
        for (size_t p = 0; p < _res_constr.datalen; p++) {
-               uint32_t arr_conv_15 = _res_vals[p];
-               LDKUpdateAddHTLC arr_conv_15_conv;
-               arr_conv_15_conv.inner = (void*)(arr_conv_15 & (~1));
-               arr_conv_15_conv.is_owned = (arr_conv_15 & 1) || (arr_conv_15 == 0);
-               _res_constr.data[p] = arr_conv_15_conv;
+               uint32_t _res_conv_15 = _res_vals[p];
+               LDKUpdateAddHTLC _res_conv_15_conv;
+               _res_conv_15_conv.inner = (void*)(_res_conv_15 & (~1));
+               _res_conv_15_conv.is_owned = (_res_conv_15 & 1) || (_res_conv_15 == 0);
+               _res_constr.data[p] = _res_conv_15_conv;
        }
        CVec_UpdateAddHTLCZ_free(_res_constr);
 }
@@ -5154,11 +7380,11 @@ void  __attribute__((visibility("default"))) TS_CVec_UpdateFulfillHTLCZ_free(uin
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
        for (size_t t = 0; t < _res_constr.datalen; t++) {
-               uint32_t arr_conv_19 = _res_vals[t];
-               LDKUpdateFulfillHTLC arr_conv_19_conv;
-               arr_conv_19_conv.inner = (void*)(arr_conv_19 & (~1));
-               arr_conv_19_conv.is_owned = (arr_conv_19 & 1) || (arr_conv_19 == 0);
-               _res_constr.data[t] = arr_conv_19_conv;
+               uint32_t _res_conv_19 = _res_vals[t];
+               LDKUpdateFulfillHTLC _res_conv_19_conv;
+               _res_conv_19_conv.inner = (void*)(_res_conv_19 & (~1));
+               _res_conv_19_conv.is_owned = (_res_conv_19 & 1) || (_res_conv_19 == 0);
+               _res_constr.data[t] = _res_conv_19_conv;
        }
        CVec_UpdateFulfillHTLCZ_free(_res_constr);
 }
@@ -5172,11 +7398,11 @@ void  __attribute__((visibility("default"))) TS_CVec_UpdateFailHTLCZ_free(uint32
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
        for (size_t q = 0; q < _res_constr.datalen; q++) {
-               uint32_t arr_conv_16 = _res_vals[q];
-               LDKUpdateFailHTLC arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               _res_constr.data[q] = arr_conv_16_conv;
+               uint32_t _res_conv_16 = _res_vals[q];
+               LDKUpdateFailHTLC _res_conv_16_conv;
+               _res_conv_16_conv.inner = (void*)(_res_conv_16 & (~1));
+               _res_conv_16_conv.is_owned = (_res_conv_16 & 1) || (_res_conv_16 == 0);
+               _res_constr.data[q] = _res_conv_16_conv;
        }
        CVec_UpdateFailHTLCZ_free(_res_constr);
 }
@@ -5190,978 +7416,1067 @@ void  __attribute__((visibility("default"))) TS_CVec_UpdateFailMalformedHTLCZ_fr
                _res_constr.data = NULL;
        uint32_t* _res_vals = (uint32_t*)(_res + 4);
        for (size_t z = 0; z < _res_constr.datalen; z++) {
-               uint32_t arr_conv_25 = _res_vals[z];
-               LDKUpdateFailMalformedHTLC arr_conv_25_conv;
-               arr_conv_25_conv.inner = (void*)(arr_conv_25 & (~1));
-               arr_conv_25_conv.is_owned = (arr_conv_25 & 1) || (arr_conv_25 == 0);
-               _res_constr.data[z] = arr_conv_25_conv;
+               uint32_t _res_conv_25 = _res_vals[z];
+               LDKUpdateFailMalformedHTLC _res_conv_25_conv;
+               _res_conv_25_conv.inner = (void*)(_res_conv_25 & (~1));
+               _res_conv_25_conv.is_owned = (_res_conv_25 & 1) || (_res_conv_25 == 0);
+               _res_constr.data[z] = _res_conv_25_conv;
        }
        CVec_UpdateFailMalformedHTLCZ_free(_res_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_ok(jboolean o) {
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_ok(o);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AcceptChannelDecodeErrorZ_ok(uint32_t o) {
+       LDKAcceptChannel o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = AcceptChannel_clone(&o_conv);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_err(uint32_t e) {
-       LDKLightningError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AcceptChannelDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_AcceptChannelDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_boolLightningErrorZ _res_conv = *(LDKCResult_boolLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_AcceptChannelDecodeErrorZ _res_conv = *(LDKCResult_AcceptChannelDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_boolLightningErrorZ_free(_res_conv);
+       CResult_AcceptChannelDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolLightningErrorZ_clone(uint32_t orig) {
-       LDKCResult_boolLightningErrorZ* orig_conv = (LDKCResult_boolLightningErrorZ*)(orig & ~1);
-       LDKCResult_boolLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolLightningErrorZ), "LDKCResult_boolLightningErrorZ");
-       *ret_conv = CResult_boolLightningErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AcceptChannelDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_AcceptChannelDecodeErrorZ* orig_conv = (LDKCResult_AcceptChannelDecodeErrorZ*)(orig & ~1);
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = CResult_AcceptChannelDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(uint32_t _res) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_ok(uint32_t o) {
+       LDKAnnouncementSignatures o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = AnnouncementSignatures_clone(&o_conv);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ _res_conv = *(LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res_conv);
+       CResult_AnnouncementSignaturesDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(uint32_t a, uint32_t b, uint32_t c) {
-       LDKChannelAnnouncement a_conv;
-       a_conv.inner = (void*)(a & (~1));
-       a_conv.is_owned = (a & 1) || (a == 0);
-       a_conv = ChannelAnnouncement_clone(&a_conv);
-       LDKChannelUpdate b_conv;
-       b_conv.inner = (void*)(b & (~1));
-       b_conv.is_owned = (b & 1) || (b == 0);
-       b_conv = ChannelUpdate_clone(&b_conv);
-       LDKChannelUpdate c_conv;
-       c_conv.inner = (void*)(c & (~1));
-       c_conv.is_owned = (c & 1) || (c == 0);
-       c_conv = ChannelUpdate_clone(&c_conv);
-       LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ* ret_ref = MALLOC(sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ");
-       *ret_ref = C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a_conv, b_conv, c_conv);
-       return (long)ret_ref;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_AnnouncementSignaturesDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* orig_conv = (LDKCResult_AnnouncementSignaturesDecodeErrorZ*)(orig & ~1);
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(uint32_tArray _res) {
-       LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ), "LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t l = 0; l < _res_constr.datalen; l++) {
-               uint32_t arr_conv_63 = _res_vals[l];
-               LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ arr_conv_63_conv = *(LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ*)(((uint64_t)arr_conv_63) & ~1);
-               FREE((void*)arr_conv_63);
-               _res_constr.data[l] = arr_conv_63_conv;
-       }
-       CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelReestablishDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelReestablish o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelReestablish_clone(&o_conv);
+       LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
+       *ret_conv = CResult_ChannelReestablishDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_NodeAnnouncementZ_free(uint32_tArray _res) {
-       LDKCVec_NodeAnnouncementZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKNodeAnnouncement), "LDKCVec_NodeAnnouncementZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t s = 0; s < _res_constr.datalen; s++) {
-               uint32_t arr_conv_18 = _res_vals[s];
-               LDKNodeAnnouncement arr_conv_18_conv;
-               arr_conv_18_conv.inner = (void*)(arr_conv_18 & (~1));
-               arr_conv_18_conv.is_owned = (arr_conv_18 & 1) || (arr_conv_18 == 0);
-               _res_constr.data[s] = arr_conv_18_conv;
-       }
-       CVec_NodeAnnouncementZ_free(_res_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelReestablishDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
+       *ret_conv = CResult_ChannelReestablishDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_ok() {
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_ok();
+void  __attribute__((visibility("default"))) TS_CResult_ChannelReestablishDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ChannelReestablishDecodeErrorZ _res_conv = *(LDKCResult_ChannelReestablishDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ChannelReestablishDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelReestablishDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelReestablishDecodeErrorZ* orig_conv = (LDKCResult_ChannelReestablishDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
+       *ret_conv = CResult_ChannelReestablishDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ClosingSignedDecodeErrorZ_ok(uint32_t o) {
+       LDKClosingSigned o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ClosingSigned_clone(&o_conv);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_ok(o_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ClosingSignedDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_err(e_conv);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_CResult_ClosingSignedDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_ClosingSignedDecodeErrorZ _res_conv = *(LDKCResult_ClosingSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_ClosingSignedDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ClosingSignedDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ClosingSignedDecodeErrorZ* orig_conv = (LDKCResult_ClosingSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = CResult_ClosingSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentSignedDecodeErrorZ_ok(uint32_t o) {
+       LDKCommitmentSigned o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = CommitmentSigned_clone(&o_conv);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_err(uint32_t e) {
-       LDKLightningError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentSignedDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_CommitmentSignedDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NoneLightningErrorZ _res_conv = *(LDKCResult_NoneLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_CommitmentSignedDecodeErrorZ _res_conv = *(LDKCResult_CommitmentSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NoneLightningErrorZ_free(_res_conv);
+       CResult_CommitmentSignedDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NoneLightningErrorZ_clone(uint32_t orig) {
-       LDKCResult_NoneLightningErrorZ* orig_conv = (LDKCResult_NoneLightningErrorZ*)(orig & ~1);
-       LDKCResult_NoneLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NoneLightningErrorZ), "LDKCResult_NoneLightningErrorZ");
-       *ret_conv = CResult_NoneLightningErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_CommitmentSignedDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_CommitmentSignedDecodeErrorZ* orig_conv = (LDKCResult_CommitmentSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CResult_CommitmentSignedDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelReestablishDecodeErrorZ_ok(uint32_t o) {
-       LDKChannelReestablish o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingCreatedDecodeErrorZ_ok(uint32_t o) {
+       LDKFundingCreated o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ChannelReestablish_clone(&o_conv);
-       LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
-       *ret_conv = CResult_ChannelReestablishDecodeErrorZ_ok(o_conv);
+       o_conv = FundingCreated_clone(&o_conv);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelReestablishDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingCreatedDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ChannelReestablishDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelReestablishDecodeErrorZ), "LDKCResult_ChannelReestablishDecodeErrorZ");
-       *ret_conv = CResult_ChannelReestablishDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_ChannelReestablishDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_FundingCreatedDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ChannelReestablishDecodeErrorZ _res_conv = *(LDKCResult_ChannelReestablishDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingCreatedDecodeErrorZ _res_conv = *(LDKCResult_FundingCreatedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ChannelReestablishDecodeErrorZ_free(_res_conv);
+       CResult_FundingCreatedDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_ok(uint32_t o) {
-       LDKInit o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingCreatedDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_FundingCreatedDecodeErrorZ* orig_conv = (LDKCResult_FundingCreatedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = CResult_FundingCreatedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingSignedDecodeErrorZ_ok(uint32_t o) {
+       LDKFundingSigned o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Init_clone(&o_conv);
-       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
-       *ret_conv = CResult_InitDecodeErrorZ_ok(o_conv);
+       o_conv = FundingSigned_clone(&o_conv);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingSignedDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
-       *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_FundingSignedDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_InitDecodeErrorZ _res_conv = *(LDKCResult_InitDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingSignedDecodeErrorZ _res_conv = *(LDKCResult_FundingSignedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_InitDecodeErrorZ_free(_res_conv);
+       CResult_FundingSignedDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_ok(uint32_t o) {
-       LDKPing o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingSignedDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_FundingSignedDecodeErrorZ* orig_conv = (LDKCResult_FundingSignedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = CResult_FundingSignedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingLockedDecodeErrorZ_ok(uint32_t o) {
+       LDKFundingLocked o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Ping_clone(&o_conv);
-       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
-       *ret_conv = CResult_PingDecodeErrorZ_ok(o_conv);
+       o_conv = FundingLocked_clone(&o_conv);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingLockedDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
-       *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_FundingLockedDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PingDecodeErrorZ _res_conv = *(LDKCResult_PingDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_FundingLockedDecodeErrorZ _res_conv = *(LDKCResult_FundingLockedDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PingDecodeErrorZ_free(_res_conv);
+       CResult_FundingLockedDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_ok(uint32_t o) {
-       LDKPong o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_FundingLockedDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_FundingLockedDecodeErrorZ* orig_conv = (LDKCResult_FundingLockedDecodeErrorZ*)(orig & ~1);
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = CResult_FundingLockedDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_ok(uint32_t o) {
+       LDKInit o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Pong_clone(&o_conv);
-       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
-       *ret_conv = CResult_PongDecodeErrorZ_ok(o_conv);
+       o_conv = Init_clone(&o_conv);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
-       *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_PongDecodeErrorZ _res_conv = *(LDKCResult_PongDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_InitDecodeErrorZ _res_conv = *(LDKCResult_InitDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_PongDecodeErrorZ_free(_res_conv);
+       CResult_InitDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(uint32_t o) {
-       LDKUnsignedChannelAnnouncement o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_InitDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_InitDecodeErrorZ* orig_conv = (LDKCResult_InitDecodeErrorZ*)(orig & ~1);
+       LDKCResult_InitDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitDecodeErrorZ), "LDKCResult_InitDecodeErrorZ");
+       *ret_conv = CResult_InitDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OpenChannelDecodeErrorZ_ok(uint32_t o) {
+       LDKOpenChannel o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedChannelAnnouncement_clone(&o_conv);
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o_conv);
+       o_conv = OpenChannel_clone(&o_conv);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OpenChannelDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_OpenChannelDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_OpenChannelDecodeErrorZ _res_conv = *(LDKCResult_OpenChannelDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res_conv);
+       CResult_OpenChannelDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_ok(uint32_t o) {
-       LDKUnsignedChannelUpdate o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_OpenChannelDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_OpenChannelDecodeErrorZ* orig_conv = (LDKCResult_OpenChannelDecodeErrorZ*)(orig & ~1);
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = CResult_OpenChannelDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RevokeAndACKDecodeErrorZ_ok(uint32_t o) {
+       LDKRevokeAndACK o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedChannelUpdate_clone(&o_conv);
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o_conv);
+       o_conv = RevokeAndACK_clone(&o_conv);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RevokeAndACKDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
-       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_RevokeAndACKDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_RevokeAndACKDecodeErrorZ _res_conv = *(LDKCResult_RevokeAndACKDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res_conv);
+       CResult_RevokeAndACKDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_ok(uint32_t o) {
-       LDKErrorMessage o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_RevokeAndACKDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_RevokeAndACKDecodeErrorZ* orig_conv = (LDKCResult_RevokeAndACKDecodeErrorZ*)(orig & ~1);
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = CResult_RevokeAndACKDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ShutdownDecodeErrorZ_ok(uint32_t o) {
+       LDKShutdown o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ErrorMessage_clone(&o_conv);
-       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
-       *ret_conv = CResult_ErrorMessageDecodeErrorZ_ok(o_conv);
+       o_conv = Shutdown_clone(&o_conv);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ShutdownDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
-       *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ShutdownDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ErrorMessageDecodeErrorZ _res_conv = *(LDKCResult_ErrorMessageDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ShutdownDecodeErrorZ _res_conv = *(LDKCResult_ShutdownDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ErrorMessageDecodeErrorZ_free(_res_conv);
+       CResult_ShutdownDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(uint32_t o) {
-       LDKUnsignedNodeAnnouncement o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ShutdownDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ShutdownDecodeErrorZ* orig_conv = (LDKCResult_ShutdownDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = CResult_ShutdownDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_ok(uint32_t o) {
+       LDKUpdateFailHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = UnsignedNodeAnnouncement_clone(&o_conv);
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFailHTLC_clone(&o_conv);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
-       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFailHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFailHTLCDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_ok(uint32_t o) {
-       LDKQueryShortChannelIds o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailHTLCDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFailHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(uint32_t o) {
+       LDKUpdateFailMalformedHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = QueryShortChannelIds_clone(&o_conv);
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
-       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFailMalformedHTLC_clone(&o_conv);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
-       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_QueryShortChannelIdsDecodeErrorZ _res_conv = *(LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_QueryShortChannelIdsDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(uint32_t o) {
-       LDKReplyShortChannelIdsEnd o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFeeDecodeErrorZ_ok(uint32_t o) {
+       LDKUpdateFee o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ReplyShortChannelIdsEnd_clone(&o_conv);
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
-       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFee_clone(&o_conv);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFeeDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
-       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UpdateFeeDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res_conv = *(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFeeDecodeErrorZ _res_conv = *(LDKCResult_UpdateFeeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFeeDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_ok(uint32_t o) {
-       LDKQueryChannelRange o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFeeDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UpdateFeeDecodeErrorZ* orig_conv = (LDKCResult_UpdateFeeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = CResult_UpdateFeeDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_ok(uint32_t o) {
+       LDKUpdateFulfillHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = QueryChannelRange_clone(&o_conv);
-       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateFulfillHTLC_clone(&o_conv);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_QueryChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_QueryChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_QueryChannelRangeDecodeErrorZ_free(_res_conv);
+       CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_ok(uint32_t o) {
-       LDKReplyChannelRange o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateFulfillHTLCDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateFulfillHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_ok(uint32_t o) {
+       LDKUpdateAddHTLC o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = ReplyChannelRange_clone(&o_conv);
-       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_ok(o_conv);
+       o_conv = UpdateAddHTLC_clone(&o_conv);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
-       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_ReplyChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_ReplyChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ _res_conv = *(LDKCResult_UpdateAddHTLCDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_ReplyChannelRangeDecodeErrorZ_free(_res_conv);
+       CResult_UpdateAddHTLCDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_ok(uint32_t o) {
-       LDKGossipTimestampFilter o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UpdateAddHTLCDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* orig_conv = (LDKCResult_UpdateAddHTLCDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = CResult_UpdateAddHTLCDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_ok(uint32_t o) {
+       LDKPing o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = GossipTimestampFilter_clone(&o_conv);
-       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
-       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_ok(o_conv);
+       o_conv = Ping_clone(&o_conv);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
-       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_GossipTimestampFilterDecodeErrorZ _res_conv = *(LDKCResult_GossipTimestampFilterDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_PingDecodeErrorZ _res_conv = *(LDKCResult_PingDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_GossipTimestampFilterDecodeErrorZ_free(_res_conv);
-}
-
-void  __attribute__((visibility("default"))) TS_CVec_PublicKeyZ_free(ptrArray _res) {
-       LDKCVec_PublicKeyZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKPublicKey), "LDKCVec_PublicKeyZ Elements");
-       else
-               _res_constr.data = NULL;
-       int8_tArray* _res_vals = (int8_tArray*)(_res + 4);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = _res_vals[m];
-               LDKPublicKey arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 33);
-               memcpy(arr_conv_12_ref.compressed_form, (uint8_t*)(arr_conv_12 + 4), 33);
-               _res_constr.data[m] = arr_conv_12_ref;
-       }
-       CVec_PublicKeyZ_free(_res_constr);
+       CResult_PingDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_u8Z_free(int8_tArray _res) {
-       LDKCVec_u8Z _res_ref;
-       _res_ref.datalen = *((uint32_t*)_res);
-       _res_ref.data = MALLOC(_res_ref.datalen, "LDKCVec_u8Z Bytes");
-       memcpy(_res_ref.data, (uint8_t*)(_res + 4), _res_ref.datalen);
-       CVec_u8Z_free(_res_ref);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PingDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_PingDecodeErrorZ* orig_conv = (LDKCResult_PingDecodeErrorZ*)(orig & ~1);
+       LDKCResult_PingDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PingDecodeErrorZ), "LDKCResult_PingDecodeErrorZ");
+       *ret_conv = CResult_PingDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_ok(int8_tArray o) {
-       LDKCVec_u8Z o_ref;
-       o_ref.datalen = *((uint32_t*)o);
-       o_ref.data = MALLOC(o_ref.datalen, "LDKCVec_u8Z Bytes");
-       memcpy(o_ref.data, (uint8_t*)(o + 4), o_ref.datalen);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_ok(o_ref);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_ok(uint32_t o) {
+       LDKPong o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = Pong_clone(&o_conv);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
-
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_err(uint32_t e) {
-       LDKPeerHandleError e_conv;
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_CVec_u8ZPeerHandleErrorZ _res_conv = *(LDKCResult_CVec_u8ZPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_PongDecodeErrorZ _res_conv = *(LDKCResult_PongDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_CVec_u8ZPeerHandleErrorZ_free(_res_conv);
+       CResult_PongDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_u8ZPeerHandleErrorZ_clone(uint32_t orig) {
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* orig_conv = (LDKCResult_CVec_u8ZPeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_CVec_u8ZPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_u8ZPeerHandleErrorZ), "LDKCResult_CVec_u8ZPeerHandleErrorZ");
-       *ret_conv = CResult_CVec_u8ZPeerHandleErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_PongDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_PongDecodeErrorZ* orig_conv = (LDKCResult_PongDecodeErrorZ*)(orig & ~1);
+       LDKCResult_PongDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PongDecodeErrorZ), "LDKCResult_PongDecodeErrorZ");
+       *ret_conv = CResult_PongDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_ok() {
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_ok();
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(uint32_t o) {
+       LDKUnsignedChannelAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedChannelAnnouncement_clone(&o_conv);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_err(uint32_t e) {
-       LDKPeerHandleError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NonePeerHandleErrorZ _res_conv = *(LDKCResult_NonePeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NonePeerHandleErrorZ_free(_res_conv);
+       CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NonePeerHandleErrorZ_clone(uint32_t orig) {
-       LDKCResult_NonePeerHandleErrorZ* orig_conv = (LDKCResult_NonePeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_NonePeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NonePeerHandleErrorZ), "LDKCResult_NonePeerHandleErrorZ");
-       *ret_conv = CResult_NonePeerHandleErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ), "LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_ok(jboolean o) {
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_ok(o);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = ChannelAnnouncement_clone(&o_conv);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_err(uint32_t e) {
-       LDKPeerHandleError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = PeerHandleError_clone(&e_conv);
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_boolPeerHandleErrorZ _res_conv = *(LDKCResult_boolPeerHandleErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_ChannelAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_boolPeerHandleErrorZ_free(_res_conv);
+       CResult_ChannelAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_boolPeerHandleErrorZ_clone(uint32_t orig) {
-       LDKCResult_boolPeerHandleErrorZ* orig_conv = (LDKCResult_boolPeerHandleErrorZ*)(orig & ~1);
-       LDKCResult_boolPeerHandleErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_boolPeerHandleErrorZ), "LDKCResult_boolPeerHandleErrorZ");
-       *ret_conv = CResult_boolPeerHandleErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelAnnouncementDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_ChannelAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_ChannelAnnouncementDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_SecretKeySecpErrorZ_ok(int8_tArray o) {
-       LDKSecretKey o_ref;
-       CHECK(*((uint32_t*)o) == 32);
-       memcpy(o_ref.bytes, (uint8_t*)(o + 4), 32);
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
-       *ret_conv = CResult_SecretKeySecpErrorZ_ok(o_ref);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_ok(uint32_t o) {
+       LDKUnsignedChannelUpdate o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedChannelUpdate_clone(&o_conv);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_SecretKeySecpErrorZ_err(uint32_t e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
-       *ret_conv = CResult_SecretKeySecpErrorZ_err(e_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_SecretKeySecpErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_SecretKeySecpErrorZ _res_conv = *(LDKCResult_SecretKeySecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_SecretKeySecpErrorZ_free(_res_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PublicKeySecpErrorZ_ok(int8_tArray o) {
-       LDKPublicKey o_ref;
-       CHECK(*((uint32_t*)o) == 33);
-       memcpy(o_ref.compressed_form, (uint8_t*)(o + 4), 33);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
-       *ret_conv = CResult_PublicKeySecpErrorZ_ok(o_ref);
-       return (long)ret_conv;
+       CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_PublicKeySecpErrorZ_err(uint32_t e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
-       *ret_conv = CResult_PublicKeySecpErrorZ_err(e_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedChannelUpdateDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* orig_conv = (LDKCResult_UnsignedChannelUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedChannelUpdateDecodeErrorZ), "LDKCResult_UnsignedChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_PublicKeySecpErrorZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_PublicKeySecpErrorZ _res_conv = *(LDKCResult_PublicKeySecpErrorZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_PublicKeySecpErrorZ_free(_res_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysSecpErrorZ_ok(uint32_t o) {
-       LDKTxCreationKeys o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelUpdateDecodeErrorZ_ok(uint32_t o) {
+       LDKChannelUpdate o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = TxCreationKeys_clone(&o_conv);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
-       *ret_conv = CResult_TxCreationKeysSecpErrorZ_ok(o_conv);
+       o_conv = ChannelUpdate_clone(&o_conv);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysSecpErrorZ_err(uint32_t e) {
-       LDKSecp256k1Error e_conv = LDKSecp256k1Error_from_js(e);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
-       *ret_conv = CResult_TxCreationKeysSecpErrorZ_err(e_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelUpdateDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_TxCreationKeysSecpErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ChannelUpdateDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_TxCreationKeysSecpErrorZ _res_conv = *(LDKCResult_TxCreationKeysSecpErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ChannelUpdateDecodeErrorZ _res_conv = *(LDKCResult_ChannelUpdateDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_TxCreationKeysSecpErrorZ_free(_res_conv);
+       CResult_ChannelUpdateDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_ok(uint32_t o) {
-       LDKTrustedCommitmentTransaction o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ChannelUpdateDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ChannelUpdateDecodeErrorZ* orig_conv = (LDKCResult_ChannelUpdateDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = CResult_ChannelUpdateDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_ok(uint32_t o) {
+       LDKErrorMessage o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       // Warning: we need a move here but no clone is available for LDKTrustedCommitmentTransaction
-       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
-       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_ok(o_conv);
+       o_conv = ErrorMessage_clone(&o_conv);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_err() {
-       LDKCResult_TrustedCommitmentTransactionNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_TrustedCommitmentTransactionNoneZ), "LDKCResult_TrustedCommitmentTransactionNoneZ");
-       *ret_conv = CResult_TrustedCommitmentTransactionNoneZ_err();
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_TrustedCommitmentTransactionNoneZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_TrustedCommitmentTransactionNoneZ _res_conv = *(LDKCResult_TrustedCommitmentTransactionNoneZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ErrorMessageDecodeErrorZ _res_conv = *(LDKCResult_ErrorMessageDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_TrustedCommitmentTransactionNoneZ_free(_res_conv);
+       CResult_ErrorMessageDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_ok(ptrArray o) {
-       LDKCVec_SignatureZ o_constr;
-       o_constr.datalen = *((uint32_t*)o);
-       if (o_constr.datalen > 0)
-               o_constr.data = MALLOC(o_constr.datalen * sizeof(LDKSignature), "LDKCVec_SignatureZ Elements");
-       else
-               o_constr.data = NULL;
-       int8_tArray* o_vals = (int8_tArray*)(o + 4);
-       for (size_t m = 0; m < o_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = o_vals[m];
-               LDKSignature arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 64);
-               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
-               o_constr.data[m] = arr_conv_12_ref;
-       }
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_ok(o_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ErrorMessageDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ErrorMessageDecodeErrorZ* orig_conv = (LDKCResult_ErrorMessageDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ErrorMessageDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ErrorMessageDecodeErrorZ), "LDKCResult_ErrorMessageDecodeErrorZ");
+       *ret_conv = CResult_ErrorMessageDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_err() {
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_err();
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(uint32_t o) {
+       LDKUnsignedNodeAnnouncement o_conv;
+       o_conv.inner = (void*)(o & (~1));
+       o_conv.is_owned = (o & 1) || (o == 0);
+       o_conv = UnsignedNodeAnnouncement_clone(&o_conv);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_free(uint32_t _res) {
-       if ((_res & 1) != 0) return;
-       LDKCResult_CVec_SignatureZNoneZ _res_conv = *(LDKCResult_CVec_SignatureZNoneZ*)(((uint64_t)_res) & ~1);
-       FREE((void*)_res);
-       CResult_CVec_SignatureZNoneZ_free(_res_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CResult_CVec_SignatureZNoneZ_clone(uint32_t orig) {
-       LDKCResult_CVec_SignatureZNoneZ* orig_conv = (LDKCResult_CVec_SignatureZNoneZ*)(orig & ~1);
-       LDKCResult_CVec_SignatureZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_SignatureZNoneZ), "LDKCResult_CVec_SignatureZNoneZ");
-       *ret_conv = CResult_CVec_SignatureZNoneZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
+       e_conv.inner = (void*)(e & (~1));
+       e_conv.is_owned = (e & 1) || (e == 0);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_RouteHopZ_free(uint32_tArray _res) {
-       LDKCVec_RouteHopZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t k = 0; k < _res_constr.datalen; k++) {
-               uint32_t arr_conv_10 = _res_vals[k];
-               LDKRouteHop arr_conv_10_conv;
-               arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-               arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-               _res_constr.data[k] = arr_conv_10_conv;
-       }
-       CVec_RouteHopZ_free(_res_constr);
+void  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(uint32_t _res) {
+       if ((_res & 1) != 0) return;
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       FREE((void*)_res);
+       CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_CVec_RouteHopZZ_free(ptrArray _res) {
-       LDKCVec_CVec_RouteHopZZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKCVec_RouteHopZ), "LDKCVec_CVec_RouteHopZZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_tArray* _res_vals = (uint32_tArray*)(_res + 4);
-       for (size_t m = 0; m < _res_constr.datalen; m++) {
-               uint32_tArray arr_conv_12 = _res_vals[m];
-               LDKCVec_RouteHopZ arr_conv_12_constr;
-               arr_conv_12_constr.datalen = *((uint32_t*)arr_conv_12);
-               if (arr_conv_12_constr.datalen > 0)
-                       arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
-               else
-                       arr_conv_12_constr.data = NULL;
-               uint32_t* arr_conv_12_vals = (uint32_t*)(arr_conv_12 + 4);
-               for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
-                       uint32_t arr_conv_10 = arr_conv_12_vals[k];
-                       LDKRouteHop arr_conv_10_conv;
-                       arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-                       arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-                       arr_conv_12_constr.data[k] = arr_conv_10_conv;
-               }
-               _res_constr.data[m] = arr_conv_12_constr;
-       }
-       CVec_CVec_RouteHopZZ_free(_res_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ), "LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_ok(uint32_t o) {
-       LDKRoute o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementDecodeErrorZ_ok(uint32_t o) {
+       LDKNodeAnnouncement o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Route_clone(&o_conv);
-       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
-       *ret_conv = CResult_RouteDecodeErrorZ_ok(o_conv);
+       o_conv = NodeAnnouncement_clone(&o_conv);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_RouteDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteDecodeErrorZ), "LDKCResult_RouteDecodeErrorZ");
-       *ret_conv = CResult_RouteDecodeErrorZ_err(e_conv);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_RouteDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RouteDecodeErrorZ _res_conv = *(LDKCResult_RouteDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_NodeAnnouncementDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RouteDecodeErrorZ_free(_res_conv);
+       CResult_NodeAnnouncementDecodeErrorZ_free(_res_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_CVec_RouteHintZ_free(uint32_tArray _res) {
-       LDKCVec_RouteHintZ _res_constr;
-       _res_constr.datalen = *((uint32_t*)_res);
-       if (_res_constr.datalen > 0)
-               _res_constr.data = MALLOC(_res_constr.datalen * sizeof(LDKRouteHint), "LDKCVec_RouteHintZ Elements");
-       else
-               _res_constr.data = NULL;
-       uint32_t* _res_vals = (uint32_t*)(_res + 4);
-       for (size_t l = 0; l < _res_constr.datalen; l++) {
-               uint32_t arr_conv_11 = _res_vals[l];
-               LDKRouteHint arr_conv_11_conv;
-               arr_conv_11_conv.inner = (void*)(arr_conv_11 & (~1));
-               arr_conv_11_conv.is_owned = (arr_conv_11 & 1) || (arr_conv_11 == 0);
-               _res_constr.data[l] = arr_conv_11_conv;
-       }
-       CVec_RouteHintZ_free(_res_constr);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_NodeAnnouncementDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementDecodeErrorZ*)(orig & ~1);
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = CResult_NodeAnnouncementDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_ok(uint32_t o) {
-       LDKRoute o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_ok(uint32_t o) {
+       LDKQueryShortChannelIds o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = Route_clone(&o_conv);
-       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
-       *ret_conv = CResult_RouteLightningErrorZ_ok(o_conv);
+       o_conv = QueryShortChannelIds_clone(&o_conv);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_err(uint32_t e) {
-       LDKLightningError e_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_err(uint32_t e) {
+       LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
-       e_conv = LightningError_clone(&e_conv);
-       LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
-       *ret_conv = CResult_RouteLightningErrorZ_err(e_conv);
+       e_conv = DecodeError_clone(&e_conv);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_RouteLightningErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RouteLightningErrorZ _res_conv = *(LDKCResult_RouteLightningErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ _res_conv = *(LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RouteLightningErrorZ_free(_res_conv);
+       CResult_QueryShortChannelIdsDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_ok(uint32_t o) {
-       LDKRoutingFees o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryShortChannelIdsDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* orig_conv = (LDKCResult_QueryShortChannelIdsDecodeErrorZ*)(orig & ~1);
+       LDKCResult_QueryShortChannelIdsDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryShortChannelIdsDecodeErrorZ), "LDKCResult_QueryShortChannelIdsDecodeErrorZ");
+       *ret_conv = CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(uint32_t o) {
+       LDKReplyShortChannelIdsEnd o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = RoutingFees_clone(&o_conv);
-       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
-       *ret_conv = CResult_RoutingFeesDecodeErrorZ_ok(o_conv);
+       o_conv = ReplyShortChannelIdsEnd_clone(&o_conv);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_RoutingFeesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RoutingFeesDecodeErrorZ), "LDKCResult_RoutingFeesDecodeErrorZ");
-       *ret_conv = CResult_RoutingFeesDecodeErrorZ_err(e_conv);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_RoutingFeesDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_RoutingFeesDecodeErrorZ _res_conv = *(LDKCResult_RoutingFeesDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res_conv = *(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_RoutingFeesDecodeErrorZ_free(_res_conv);
+       CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_ok(uint32_t o) {
-       LDKNodeAnnouncementInfo o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* orig_conv = (LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ), "LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ");
+       *ret_conv = CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_ok(uint32_t o) {
+       LDKQueryChannelRange o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = NodeAnnouncementInfo_clone(&o_conv);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o_conv);
+       o_conv = QueryChannelRange_clone(&o_conv);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_err(e_conv);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_QueryChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_QueryChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res_conv);
+       CResult_QueryChannelRangeDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeAnnouncementInfoDecodeErrorZ_clone(uint32_t orig) {
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeAnnouncementInfoDecodeErrorZ*)(orig & ~1);
-       LDKCResult_NodeAnnouncementInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementInfoDecodeErrorZ), "LDKCResult_NodeAnnouncementInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_QueryChannelRangeDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_QueryChannelRangeDecodeErrorZ* orig_conv = (LDKCResult_QueryChannelRangeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_QueryChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_QueryChannelRangeDecodeErrorZ), "LDKCResult_QueryChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_QueryChannelRangeDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_ok(uint32_t o) {
-       LDKNodeInfo o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_ok(uint32_t o) {
+       LDKReplyChannelRange o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       o_conv = NodeInfo_clone(&o_conv);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_ok(o_conv);
+       o_conv = ReplyChannelRange_clone(&o_conv);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_err(e_conv);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NodeInfoDecodeErrorZ _res_conv = *(LDKCResult_NodeInfoDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ _res_conv = *(LDKCResult_ReplyChannelRangeDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NodeInfoDecodeErrorZ_free(_res_conv);
+       CResult_ReplyChannelRangeDecodeErrorZ_free(_res_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NodeInfoDecodeErrorZ_clone(uint32_t orig) {
-       LDKCResult_NodeInfoDecodeErrorZ* orig_conv = (LDKCResult_NodeInfoDecodeErrorZ*)(orig & ~1);
-       LDKCResult_NodeInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeInfoDecodeErrorZ), "LDKCResult_NodeInfoDecodeErrorZ");
-       *ret_conv = CResult_NodeInfoDecodeErrorZ_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_CResult_ReplyChannelRangeDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* orig_conv = (LDKCResult_ReplyChannelRangeDecodeErrorZ*)(orig & ~1);
+       LDKCResult_ReplyChannelRangeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ReplyChannelRangeDecodeErrorZ), "LDKCResult_ReplyChannelRangeDecodeErrorZ");
+       *ret_conv = CResult_ReplyChannelRangeDecodeErrorZ_clone(orig_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_ok(uint32_t o) {
-       LDKNetworkGraph o_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_ok(uint32_t o) {
+       LDKGossipTimestampFilter o_conv;
        o_conv.inner = (void*)(o & (~1));
        o_conv.is_owned = (o & 1) || (o == 0);
-       // Warning: we need a move here but no clone is available for LDKNetworkGraph
-       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
-       *ret_conv = CResult_NetworkGraphDecodeErrorZ_ok(o_conv);
+       o_conv = GossipTimestampFilter_clone(&o_conv);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_ok(o_conv);
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_err(uint32_t e) {
+uint32_t  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_err(uint32_t e) {
        LDKDecodeError e_conv;
        e_conv.inner = (void*)(e & (~1));
        e_conv.is_owned = (e & 1) || (e == 0);
        e_conv = DecodeError_clone(&e_conv);
-       LDKCResult_NetworkGraphDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NetworkGraphDecodeErrorZ), "LDKCResult_NetworkGraphDecodeErrorZ");
-       *ret_conv = CResult_NetworkGraphDecodeErrorZ_err(e_conv);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_err(e_conv);
        return (long)ret_conv;
 }
 
-void  __attribute__((visibility("default"))) TS_CResult_NetworkGraphDecodeErrorZ_free(uint32_t _res) {
+void  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_free(uint32_t _res) {
        if ((_res & 1) != 0) return;
-       LDKCResult_NetworkGraphDecodeErrorZ _res_conv = *(LDKCResult_NetworkGraphDecodeErrorZ*)(((uint64_t)_res) & ~1);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ _res_conv = *(LDKCResult_GossipTimestampFilterDecodeErrorZ*)(((uint64_t)_res) & ~1);
        FREE((void*)_res);
-       CResult_NetworkGraphDecodeErrorZ_free(_res_conv);
+       CResult_GossipTimestampFilterDecodeErrorZ_free(_res_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_CResult_GossipTimestampFilterDecodeErrorZ_clone(uint32_t orig) {
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* orig_conv = (LDKCResult_GossipTimestampFilterDecodeErrorZ*)(orig & ~1);
+       LDKCResult_GossipTimestampFilterDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_GossipTimestampFilterDecodeErrorZ), "LDKCResult_GossipTimestampFilterDecodeErrorZ");
+       *ret_conv = CResult_GossipTimestampFilterDecodeErrorZ_clone(orig_conv);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_Event_free(uint32_t this_ptr) {
@@ -6181,11 +8496,11 @@ uint32_t  __attribute__((visibility("default"))) TS_Event_clone(uint32_t orig) {
 
 int8_tArray  __attribute__((visibility("default"))) TS_Event_write(uint32_t obj) {
        LDKEvent* obj_conv = (LDKEvent*)obj;
-       LDKCVec_u8Z arg_var = Event_write(obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Event_write(obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_MessageSendEvent_free(uint32_t this_ptr) {
@@ -6257,20 +8572,6 @@ void  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_free(uint
        ChannelHandshakeConfig_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_clone(uint32_t orig) {
-       LDKChannelHandshakeConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_get_minimum_depth(uint32_t this_ptr) {
        LDKChannelHandshakeConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -6327,8 +8628,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_new(i
        return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_default() {
-       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_default();
+uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_clone(uint32_t orig) {
+       LDKChannelHandshakeConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -6338,18 +8642,8 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_defau
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_free(uint32_t this_ptr) {
-       LDKChannelHandshakeLimits this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelHandshakeLimits_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_clone(uint32_t orig) {
-       LDKChannelHandshakeLimits orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_clone(&orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeConfig_default() {
+       LDKChannelHandshakeConfig ret_var = ChannelHandshakeConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -6359,6 +8653,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_clone
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_free(uint32_t this_ptr) {
+       LDKChannelHandshakeLimits this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelHandshakeLimits_free(this_ptr_conv);
+}
+
 int64_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_get_min_funding_satoshis(uint32_t this_ptr) {
        LDKChannelHandshakeLimits this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -6520,8 +8821,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_new(i
        return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_default() {
-       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_default();
+uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_clone(uint32_t orig) {
+       LDKChannelHandshakeLimits orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -6531,18 +8835,8 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_defau
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelConfig_free(uint32_t this_ptr) {
-       LDKChannelConfig this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelConfig_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_clone(uint32_t orig) {
-       LDKChannelConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelConfig ret_var = ChannelConfig_clone(&orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_ChannelHandshakeLimits_default() {
+       LDKChannelHandshakeLimits ret_var = ChannelHandshakeLimits_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -6552,6 +8846,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelConfig_free(uint32_t this_ptr) {
+       LDKChannelConfig this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelConfig_free(this_ptr_conv);
+}
+
 int32_t  __attribute__((visibility("default"))) TS_ChannelConfig_get_fee_proportional_millionths(uint32_t this_ptr) {
        LDKChannelConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -6608,6 +8909,20 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_new(int32_t fe
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_clone(uint32_t orig) {
+       LDKChannelConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelConfig ret_var = ChannelConfig_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_default() {
        LDKChannelConfig ret_var = ChannelConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -6623,25 +8938,20 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelConfig_write(uint3
        LDKChannelConfig obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelConfig_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelConfig_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelConfig_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelConfig ret_var = ChannelConfig_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelConfigDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelConfigDecodeErrorZ), "LDKCResult_ChannelConfigDecodeErrorZ");
+       *ret_conv = ChannelConfig_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_UserConfig_free(uint32_t this_ptr) {
@@ -6651,20 +8961,6 @@ void  __attribute__((visibility("default"))) TS_UserConfig_free(uint32_t this_pt
        UserConfig_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_UserConfig_clone(uint32_t orig) {
-       LDKUserConfig orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKUserConfig ret_var = UserConfig_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_UserConfig_get_own_channel_config(uint32_t this_ptr) {
        LDKUserConfig this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -6763,6 +9059,20 @@ uint32_t  __attribute__((visibility("default"))) TS_UserConfig_new(uint32_t own_
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_UserConfig_clone(uint32_t orig) {
+       LDKUserConfig orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKUserConfig ret_var = UserConfig_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_UserConfig_default() {
        LDKUserConfig ret_var = UserConfig_default();
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -6787,6 +9097,13 @@ void  __attribute__((visibility("default"))) TS_Access_free(uint32_t this_ptr) {
        Access_free(this_ptr_conv);
 }
 
+void  __attribute__((visibility("default"))) TS_Listen_free(uint32_t this_ptr) {
+       if ((this_ptr & 1) != 0) return;
+       LDKListen this_ptr_conv = *(LDKListen*)(((uint64_t)this_ptr) & ~1);
+       FREE((void*)this_ptr);
+       Listen_free(this_ptr_conv);
+}
+
 void  __attribute__((visibility("default"))) TS_Watch_free(uint32_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKWatch this_ptr_conv = *(LDKWatch*)(((uint64_t)this_ptr) & ~1);
@@ -6844,10 +9161,10 @@ void  __attribute__((visibility("default"))) TS_ChainMonitor_block_connected(uin
                txdata_constr.data = NULL;
        uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
        for (size_t e = 0; e < txdata_constr.datalen; e++) {
-               uint32_t arr_conv_30 = txdata_vals[e];
-               LDKC2Tuple_usizeTransactionZ arr_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_conv_30) & ~1);
-               FREE((void*)arr_conv_30);
-               txdata_constr.data[e] = arr_conv_30_conv;
+               uint32_t txdata_conv_30 = txdata_vals[e];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
+               FREE((void*)txdata_conv_30);
+               txdata_constr.data[e] = txdata_conv_30_conv;
        }
        ChainMonitor_block_connected(&this_arg_conv, header_ref, txdata_constr, height);
 }
@@ -6899,23 +9216,9 @@ uint32_t  __attribute__((visibility("default"))) TS_ChainMonitor_as_EventsProvid
 
 void  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_free(uint32_t this_ptr) {
        LDKChannelMonitorUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelMonitorUpdate_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_clone(uint32_t orig) {
-       LDKChannelMonitorUpdate orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelMonitorUpdate_free(this_ptr_conv);
 }
 
 int64_t  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_get_update_id(uint32_t this_ptr) {
@@ -6933,15 +9236,29 @@ void  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_set_update_
        ChannelMonitorUpdate_set_update_id(&this_ptr_conv, val);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_clone(uint32_t orig) {
+       LDKChannelMonitorUpdate orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelMonitorUpdate ret_var = ChannelMonitorUpdate_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_write(uint32_t obj) {
        LDKChannelMonitorUpdate obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelMonitorUpdate_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelMonitorUpdate_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelMonitorUpdate_read(int8_tArray ser) {
@@ -6981,23 +9298,17 @@ uint32_t  __attribute__((visibility("default"))) TS_MonitorUpdateError_clone(uin
 }
 
 void  __attribute__((visibility("default"))) TS_MonitorEvent_free(uint32_t this_ptr) {
-       LDKMonitorEvent this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       if ((this_ptr & 1) != 0) return;
+       LDKMonitorEvent this_ptr_conv = *(LDKMonitorEvent*)(((uint64_t)this_ptr) & ~1);
+       FREE((void*)this_ptr);
        MonitorEvent_free(this_ptr_conv);
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_MonitorEvent_clone(uint32_t orig) {
-       LDKMonitorEvent orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKMonitorEvent ret_var = MonitorEvent_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
+       LDKMonitorEvent* orig_conv = (LDKMonitorEvent*)orig;
+       LDKMonitorEvent *ret_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
+       *ret_copy = MonitorEvent_clone(orig_conv);
+       long ret_ref = (long)ret_copy;
        return ret_ref;
 }
 
@@ -7026,25 +9337,20 @@ int8_tArray  __attribute__((visibility("default"))) TS_HTLCUpdate_write(uint32_t
        LDKHTLCUpdate obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = HTLCUpdate_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = HTLCUpdate_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_HTLCUpdate_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKHTLCUpdate ret_var = HTLCUpdate_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_HTLCUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCUpdateDecodeErrorZ), "LDKCResult_HTLCUpdateDecodeErrorZ");
+       *ret_conv = HTLCUpdate_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelMonitor_free(uint32_t this_ptr) {
@@ -7072,11 +9378,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_write(uint
        LDKChannelMonitor obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelMonitor_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelMonitor_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelMonitor_update_monitor(uint32_t this_arg, uint32_t updates, uint32_t broadcaster, uint32_t fee_estimator, uint32_t logger) {
@@ -7119,14 +9425,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_get_and_
        uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
        uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
        for (size_t o = 0; o < ret_var.datalen; o++) {
-               LDKMonitorEvent arr_conv_14_var = ret_var.data[o];
-               CHECK((((long)arr_conv_14_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_14_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_14_ref = (long)arr_conv_14_var.inner;
-               if (arr_conv_14_var.is_owned) {
-                       arr_conv_14_ref |= 1;
-               }
-               ret_arr_ptr[o] = arr_conv_14_ref;
+               LDKMonitorEvent *ret_conv_14_copy = MALLOC(sizeof(LDKMonitorEvent), "LDKMonitorEvent");
+               *ret_conv_14_copy = MonitorEvent_clone(&ret_var.data[o]);
+               long ret_conv_14_ref = (long)ret_conv_14_copy;
+               ret_arr_ptr[o] = ret_conv_14_ref;
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -7140,10 +9442,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_get_and_
        uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
        uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
        for (size_t h = 0; h < ret_var.datalen; h++) {
-               LDKEvent *arr_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
-               *arr_conv_7_copy = Event_clone(&ret_var.data[h]);
-               long arr_conv_7_ref = (long)arr_conv_7_copy;
-               ret_arr_ptr[h] = arr_conv_7_ref;
+               LDKEvent *ret_conv_7_copy = MALLOC(sizeof(LDKEvent), "LDKEvent");
+               *ret_conv_7_copy = Event_clone(&ret_var.data[h]);
+               long ret_conv_7_ref = (long)ret_conv_7_copy;
+               ret_arr_ptr[h] = ret_conv_7_ref;
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -7158,11 +9460,11 @@ ptrArray  __attribute__((visibility("default"))) TS_ChannelMonitor_get_latest_ho
        ptrArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
        int8_tArray *ret_arr_ptr = (int8_tArray*)(ret_arr + 4);
        for (size_t m = 0; m < ret_var.datalen; m++) {
-               LDKTransaction arr_conv_12_var = ret_var.data[m];
-               int8_tArray arr_conv_12_arr = init_arr(arr_conv_12_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-               memcpy((uint8_t*)(arr_conv_12_arr + 4), arr_conv_12_var.data, arr_conv_12_var.datalen);
-               Transaction_free(arr_conv_12_var);
-               ret_arr_ptr[m] = arr_conv_12_arr;
+               LDKTransaction ret_conv_12_var = ret_var.data[m];
+               int8_tArray ret_conv_12_arr = init_arr(ret_conv_12_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+               memcpy((uint8_t*)(ret_conv_12_arr + 4), 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;
@@ -7184,10 +9486,10 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_block_co
                txdata_constr.data = NULL;
        uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
        for (size_t e = 0; e < txdata_constr.datalen; e++) {
-               uint32_t arr_conv_30 = txdata_vals[e];
-               LDKC2Tuple_usizeTransactionZ arr_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_conv_30) & ~1);
-               FREE((void*)arr_conv_30);
-               txdata_constr.data[e] = arr_conv_30_conv;
+               uint32_t txdata_conv_30 = txdata_vals[e];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
+               FREE((void*)txdata_conv_30);
+               txdata_constr.data[e] = txdata_conv_30_conv;
        }
        LDKBroadcasterInterface broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)broadcaster) & ~1);
        LDKFeeEstimator fee_estimator_conv = *(LDKFeeEstimator*)(((uint64_t)fee_estimator) & ~1);
@@ -7196,9 +9498,9 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelMonitor_block_co
        uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
        uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
        for (size_t x = 0; x < ret_var.datalen; x++) {
-               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* arr_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
-               *arr_conv_49_ref = ret_var.data[x];
-               ret_arr_ptr[x] = (long)arr_conv_49_ref;
+               LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ* ret_conv_49_ref = MALLOC(sizeof(LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ), "LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ");
+               *ret_conv_49_ref = ret_var.data[x];
+               ret_arr_ptr[x] = (long)ret_conv_49_ref;
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -7242,20 +9544,6 @@ void  __attribute__((visibility("default"))) TS_OutPoint_free(uint32_t this_ptr)
        OutPoint_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_OutPoint_clone(uint32_t orig) {
-       LDKOutPoint orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKOutPoint ret_var = OutPoint_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_OutPoint_get_txid(uint32_t this_ptr) {
        LDKOutPoint this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7304,31 +9592,317 @@ uint32_t  __attribute__((visibility("default"))) TS_OutPoint_new(int8_tArray txi
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_OutPoint_clone(uint32_t orig) {
+       LDKOutPoint orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKOutPoint ret_var = OutPoint_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_OutPoint_to_channel_id(uint32_t this_arg) {
        LDKOutPoint this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), OutPoint_to_channel_id(&this_arg_conv).data, 32);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), OutPoint_to_channel_id(&this_arg_conv).data, 32);
+       return ret_arr;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_OutPoint_write(uint32_t obj) {
        LDKOutPoint obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = OutPoint_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = OutPoint_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_OutPoint_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKOutPoint ret_var = OutPoint_read(ser_ref);
+       LDKCResult_OutPointDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OutPointDecodeErrorZ), "LDKCResult_OutPointDecodeErrorZ");
+       *ret_conv = OutPoint_read(ser_ref);
+       return (long)ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_free(uint32_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       DelayedPaymentOutputDescriptor_free(this_ptr_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_get_outpoint(uint32_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint ret_var = DelayedPaymentOutputDescriptor_get_outpoint(&this_ptr_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_set_outpoint(uint32_t this_ptr, uint32_t val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint val_conv;
+       val_conv.inner = (void*)(val & (~1));
+       val_conv.is_owned = (val & 1) || (val == 0);
+       val_conv = OutPoint_clone(&val_conv);
+       DelayedPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_get_per_commitment_point(uint32_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), DelayedPaymentOutputDescriptor_get_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
+}
+
+void  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_set_per_commitment_point(uint32_t this_ptr, int8_tArray val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKPublicKey val_ref;
+       CHECK(*((uint32_t*)val) == 33);
+       memcpy(val_ref.compressed_form, (uint8_t*)(val + 4), 33);
+       DelayedPaymentOutputDescriptor_set_per_commitment_point(&this_ptr_conv, val_ref);
+}
+
+int16_t  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_get_to_self_delay(uint32_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int16_t ret_val = DelayedPaymentOutputDescriptor_get_to_self_delay(&this_ptr_conv);
+       return ret_val;
+}
+
+void  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_set_to_self_delay(uint32_t this_ptr, int16_t val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       DelayedPaymentOutputDescriptor_set_to_self_delay(&this_ptr_conv, val);
+}
+
+void  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_set_output(uint32_t this_ptr, uint32_t val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKTxOut val_conv = *(LDKTxOut*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       DelayedPaymentOutputDescriptor_set_output(&this_ptr_conv, val_conv);
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_get_revocation_pubkey(uint32_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), DelayedPaymentOutputDescriptor_get_revocation_pubkey(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
+}
+
+void  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_set_revocation_pubkey(uint32_t this_ptr, int8_tArray val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKPublicKey val_ref;
+       CHECK(*((uint32_t*)val) == 33);
+       memcpy(val_ref.compressed_form, (uint8_t*)(val + 4), 33);
+       DelayedPaymentOutputDescriptor_set_revocation_pubkey(&this_ptr_conv, val_ref);
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_get_channel_keys_id(uint32_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), *DelayedPaymentOutputDescriptor_get_channel_keys_id(&this_ptr_conv), 32);
+       return ret_arr;
+}
+
+void  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_set_channel_keys_id(uint32_t this_ptr, int8_tArray val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK(*((uint32_t*)val) == 32);
+       memcpy(val_ref.data, (uint8_t*)(val + 4), 32);
+       DelayedPaymentOutputDescriptor_set_channel_keys_id(&this_ptr_conv, val_ref);
+}
+
+int64_t  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_get_channel_value_satoshis(uint32_t this_ptr) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int64_t ret_val = DelayedPaymentOutputDescriptor_get_channel_value_satoshis(&this_ptr_conv);
+       return ret_val;
+}
+
+void  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_set_channel_value_satoshis(uint32_t this_ptr, int64_t val) {
+       LDKDelayedPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       DelayedPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_new(uint32_t outpoint_arg, int8_tArray per_commitment_point_arg, int16_t to_self_delay_arg, uint32_t output_arg, int8_tArray revocation_pubkey_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) {
+       LDKOutPoint outpoint_arg_conv;
+       outpoint_arg_conv.inner = (void*)(outpoint_arg & (~1));
+       outpoint_arg_conv.is_owned = (outpoint_arg & 1) || (outpoint_arg == 0);
+       outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
+       LDKPublicKey per_commitment_point_arg_ref;
+       CHECK(*((uint32_t*)per_commitment_point_arg) == 33);
+       memcpy(per_commitment_point_arg_ref.compressed_form, (uint8_t*)(per_commitment_point_arg + 4), 33);
+       LDKTxOut output_arg_conv = *(LDKTxOut*)(((uint64_t)output_arg) & ~1);
+       FREE((void*)output_arg);
+       LDKPublicKey revocation_pubkey_arg_ref;
+       CHECK(*((uint32_t*)revocation_pubkey_arg) == 33);
+       memcpy(revocation_pubkey_arg_ref.compressed_form, (uint8_t*)(revocation_pubkey_arg + 4), 33);
+       LDKThirtyTwoBytes channel_keys_id_arg_ref;
+       CHECK(*((uint32_t*)channel_keys_id_arg) == 32);
+       memcpy(channel_keys_id_arg_ref.data, (uint8_t*)(channel_keys_id_arg + 4), 32);
+       LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_new(outpoint_arg_conv, per_commitment_point_arg_ref, to_self_delay_arg, output_arg_conv, revocation_pubkey_arg_ref, channel_keys_id_arg_ref, channel_value_satoshis_arg);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_DelayedPaymentOutputDescriptor_clone(uint32_t orig) {
+       LDKDelayedPaymentOutputDescriptor orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKDelayedPaymentOutputDescriptor ret_var = DelayedPaymentOutputDescriptor_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_StaticPaymentOutputDescriptor_free(uint32_t this_ptr) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       StaticPaymentOutputDescriptor_free(this_ptr_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_StaticPaymentOutputDescriptor_get_outpoint(uint32_t this_ptr) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint ret_var = StaticPaymentOutputDescriptor_get_outpoint(&this_ptr_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+void  __attribute__((visibility("default"))) TS_StaticPaymentOutputDescriptor_set_outpoint(uint32_t this_ptr, uint32_t val) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKOutPoint val_conv;
+       val_conv.inner = (void*)(val & (~1));
+       val_conv.is_owned = (val & 1) || (val == 0);
+       val_conv = OutPoint_clone(&val_conv);
+       StaticPaymentOutputDescriptor_set_outpoint(&this_ptr_conv, val_conv);
+}
+
+void  __attribute__((visibility("default"))) TS_StaticPaymentOutputDescriptor_set_output(uint32_t this_ptr, uint32_t val) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKTxOut val_conv = *(LDKTxOut*)(((uint64_t)val) & ~1);
+       FREE((void*)val);
+       StaticPaymentOutputDescriptor_set_output(&this_ptr_conv, val_conv);
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_StaticPaymentOutputDescriptor_get_channel_keys_id(uint32_t this_ptr) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), *StaticPaymentOutputDescriptor_get_channel_keys_id(&this_ptr_conv), 32);
+       return ret_arr;
+}
+
+void  __attribute__((visibility("default"))) TS_StaticPaymentOutputDescriptor_set_channel_keys_id(uint32_t this_ptr, int8_tArray val) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK(*((uint32_t*)val) == 32);
+       memcpy(val_ref.data, (uint8_t*)(val + 4), 32);
+       StaticPaymentOutputDescriptor_set_channel_keys_id(&this_ptr_conv, val_ref);
+}
+
+int64_t  __attribute__((visibility("default"))) TS_StaticPaymentOutputDescriptor_get_channel_value_satoshis(uint32_t this_ptr) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int64_t ret_val = StaticPaymentOutputDescriptor_get_channel_value_satoshis(&this_ptr_conv);
+       return ret_val;
+}
+
+void  __attribute__((visibility("default"))) TS_StaticPaymentOutputDescriptor_set_channel_value_satoshis(uint32_t this_ptr, int64_t val) {
+       LDKStaticPaymentOutputDescriptor this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       StaticPaymentOutputDescriptor_set_channel_value_satoshis(&this_ptr_conv, val);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_StaticPaymentOutputDescriptor_new(uint32_t outpoint_arg, uint32_t output_arg, int8_tArray channel_keys_id_arg, int64_t channel_value_satoshis_arg) {
+       LDKOutPoint outpoint_arg_conv;
+       outpoint_arg_conv.inner = (void*)(outpoint_arg & (~1));
+       outpoint_arg_conv.is_owned = (outpoint_arg & 1) || (outpoint_arg == 0);
+       outpoint_arg_conv = OutPoint_clone(&outpoint_arg_conv);
+       LDKTxOut output_arg_conv = *(LDKTxOut*)(((uint64_t)output_arg) & ~1);
+       FREE((void*)output_arg);
+       LDKThirtyTwoBytes channel_keys_id_arg_ref;
+       CHECK(*((uint32_t*)channel_keys_id_arg) == 32);
+       memcpy(channel_keys_id_arg_ref.data, (uint8_t*)(channel_keys_id_arg + 4), 32);
+       LDKStaticPaymentOutputDescriptor ret_var = StaticPaymentOutputDescriptor_new(outpoint_arg_conv, output_arg_conv, channel_keys_id_arg_ref, channel_value_satoshis_arg);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_StaticPaymentOutputDescriptor_clone(uint32_t orig) {
+       LDKStaticPaymentOutputDescriptor orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKStaticPaymentOutputDescriptor ret_var = StaticPaymentOutputDescriptor_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7355,11 +9929,11 @@ uint32_t  __attribute__((visibility("default"))) TS_SpendableOutputDescriptor_cl
 
 int8_tArray  __attribute__((visibility("default"))) TS_SpendableOutputDescriptor_write(uint32_t obj) {
        LDKSpendableOutputDescriptor* obj_conv = (LDKSpendableOutputDescriptor*)obj;
-       LDKCVec_u8Z arg_var = SpendableOutputDescriptor_write(obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = SpendableOutputDescriptor_write(obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_SpendableOutputDescriptor_read(int8_tArray ser) {
@@ -7371,18 +9945,18 @@ uint32_t  __attribute__((visibility("default"))) TS_SpendableOutputDescriptor_re
        return (long)ret_conv;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelKeys_clone(uint32_t orig) {
-       LDKChannelKeys* orig_conv = (LDKChannelKeys*)orig;
-       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *ret = ChannelKeys_clone(orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_Sign_clone(uint32_t orig) {
+       LDKSign* orig_conv = (LDKSign*)orig;
+       LDKSign* ret = MALLOC(sizeof(LDKSign), "LDKSign");
+       *ret = Sign_clone(orig_conv);
        return (long)ret;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelKeys_free(uint32_t this_ptr) {
+void  __attribute__((visibility("default"))) TS_Sign_free(uint32_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
-       LDKChannelKeys this_ptr_conv = *(LDKChannelKeys*)(((uint64_t)this_ptr) & ~1);
+       LDKSign this_ptr_conv = *(LDKSign*)(((uint64_t)this_ptr) & ~1);
        FREE((void*)this_ptr);
-       ChannelKeys_free(this_ptr_conv);
+       Sign_free(this_ptr_conv);
 }
 
 void  __attribute__((visibility("default"))) TS_KeysInterface_free(uint32_t this_ptr) {
@@ -7392,142 +9966,142 @@ void  __attribute__((visibility("default"))) TS_KeysInterface_free(uint32_t this
        KeysInterface_free(this_ptr_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_free(uint32_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+void  __attribute__((visibility("default"))) TS_InMemorySigner_free(uint32_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       InMemoryChannelKeys_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_clone(uint32_t orig) {
-       LDKInMemoryChannelKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKInMemoryChannelKeys ret_var = InMemoryChannelKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       InMemorySigner_free(this_ptr_conv);
 }
 
-int8_tArray  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_get_funding_key(uint32_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+int8_tArray  __attribute__((visibility("default"))) TS_InMemorySigner_get_funding_key(uint32_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(ret_arr + 4), *InMemoryChannelKeys_get_funding_key(&this_ptr_conv), 32);
+       memcpy((uint8_t*)(ret_arr + 4), *InMemorySigner_get_funding_key(&this_ptr_conv), 32);
        return ret_arr;
 }
 
-void  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_set_funding_key(uint32_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+void  __attribute__((visibility("default"))) TS_InMemorySigner_set_funding_key(uint32_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKSecretKey val_ref;
        CHECK(*((uint32_t*)val) == 32);
        memcpy(val_ref.bytes, (uint8_t*)(val + 4), 32);
-       InMemoryChannelKeys_set_funding_key(&this_ptr_conv, val_ref);
+       InMemorySigner_set_funding_key(&this_ptr_conv, val_ref);
 }
 
-int8_tArray  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_get_revocation_base_key(uint32_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+int8_tArray  __attribute__((visibility("default"))) TS_InMemorySigner_get_revocation_base_key(uint32_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(ret_arr + 4), *InMemoryChannelKeys_get_revocation_base_key(&this_ptr_conv), 32);
+       memcpy((uint8_t*)(ret_arr + 4), *InMemorySigner_get_revocation_base_key(&this_ptr_conv), 32);
        return ret_arr;
 }
 
-void  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_set_revocation_base_key(uint32_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+void  __attribute__((visibility("default"))) TS_InMemorySigner_set_revocation_base_key(uint32_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKSecretKey val_ref;
        CHECK(*((uint32_t*)val) == 32);
        memcpy(val_ref.bytes, (uint8_t*)(val + 4), 32);
-       InMemoryChannelKeys_set_revocation_base_key(&this_ptr_conv, val_ref);
+       InMemorySigner_set_revocation_base_key(&this_ptr_conv, val_ref);
 }
 
-int8_tArray  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_get_payment_key(uint32_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+int8_tArray  __attribute__((visibility("default"))) TS_InMemorySigner_get_payment_key(uint32_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(ret_arr + 4), *InMemoryChannelKeys_get_payment_key(&this_ptr_conv), 32);
+       memcpy((uint8_t*)(ret_arr + 4), *InMemorySigner_get_payment_key(&this_ptr_conv), 32);
        return ret_arr;
 }
 
-void  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_set_payment_key(uint32_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+void  __attribute__((visibility("default"))) TS_InMemorySigner_set_payment_key(uint32_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKSecretKey val_ref;
        CHECK(*((uint32_t*)val) == 32);
        memcpy(val_ref.bytes, (uint8_t*)(val + 4), 32);
-       InMemoryChannelKeys_set_payment_key(&this_ptr_conv, val_ref);
+       InMemorySigner_set_payment_key(&this_ptr_conv, val_ref);
 }
 
-int8_tArray  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_get_delayed_payment_base_key(uint32_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+int8_tArray  __attribute__((visibility("default"))) TS_InMemorySigner_get_delayed_payment_base_key(uint32_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(ret_arr + 4), *InMemoryChannelKeys_get_delayed_payment_base_key(&this_ptr_conv), 32);
+       memcpy((uint8_t*)(ret_arr + 4), *InMemorySigner_get_delayed_payment_base_key(&this_ptr_conv), 32);
        return ret_arr;
 }
 
-void  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_set_delayed_payment_base_key(uint32_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+void  __attribute__((visibility("default"))) TS_InMemorySigner_set_delayed_payment_base_key(uint32_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKSecretKey val_ref;
        CHECK(*((uint32_t*)val) == 32);
        memcpy(val_ref.bytes, (uint8_t*)(val + 4), 32);
-       InMemoryChannelKeys_set_delayed_payment_base_key(&this_ptr_conv, val_ref);
+       InMemorySigner_set_delayed_payment_base_key(&this_ptr_conv, val_ref);
 }
 
-int8_tArray  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_get_htlc_base_key(uint32_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+int8_tArray  __attribute__((visibility("default"))) TS_InMemorySigner_get_htlc_base_key(uint32_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(ret_arr + 4), *InMemoryChannelKeys_get_htlc_base_key(&this_ptr_conv), 32);
+       memcpy((uint8_t*)(ret_arr + 4), *InMemorySigner_get_htlc_base_key(&this_ptr_conv), 32);
        return ret_arr;
 }
 
-void  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_set_htlc_base_key(uint32_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+void  __attribute__((visibility("default"))) TS_InMemorySigner_set_htlc_base_key(uint32_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKSecretKey val_ref;
        CHECK(*((uint32_t*)val) == 32);
        memcpy(val_ref.bytes, (uint8_t*)(val + 4), 32);
-       InMemoryChannelKeys_set_htlc_base_key(&this_ptr_conv, val_ref);
+       InMemorySigner_set_htlc_base_key(&this_ptr_conv, val_ref);
 }
 
-int8_tArray  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_get_commitment_seed(uint32_t this_ptr) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+int8_tArray  __attribute__((visibility("default"))) TS_InMemorySigner_get_commitment_seed(uint32_t this_ptr) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(ret_arr + 4), *InMemoryChannelKeys_get_commitment_seed(&this_ptr_conv), 32);
+       memcpy((uint8_t*)(ret_arr + 4), *InMemorySigner_get_commitment_seed(&this_ptr_conv), 32);
        return ret_arr;
 }
 
-void  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_set_commitment_seed(uint32_t this_ptr, int8_tArray val) {
-       LDKInMemoryChannelKeys this_ptr_conv;
+void  __attribute__((visibility("default"))) TS_InMemorySigner_set_commitment_seed(uint32_t this_ptr, int8_tArray val) {
+       LDKInMemorySigner this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
        LDKThirtyTwoBytes val_ref;
        CHECK(*((uint32_t*)val) == 32);
        memcpy(val_ref.data, (uint8_t*)(val + 4), 32);
-       InMemoryChannelKeys_set_commitment_seed(&this_ptr_conv, val_ref);
+       InMemorySigner_set_commitment_seed(&this_ptr_conv, val_ref);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_InMemorySigner_clone(uint32_t orig) {
+       LDKInMemorySigner orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKInMemorySigner ret_var = InMemorySigner_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_new(int8_tArray funding_key, int8_tArray revocation_base_key, int8_tArray payment_key, int8_tArray delayed_payment_base_key, int8_tArray htlc_base_key, int8_tArray commitment_seed, int64_t channel_value_satoshis, uint32_t key_derivation_params) {
+uint32_t  __attribute__((visibility("default"))) TS_InMemorySigner_new(int8_tArray funding_key, int8_tArray revocation_base_key, int8_tArray payment_key, int8_tArray delayed_payment_base_key, int8_tArray htlc_base_key, int8_tArray commitment_seed, int64_t channel_value_satoshis, int8_tArray channel_keys_id) {
        LDKSecretKey funding_key_ref;
        CHECK(*((uint32_t*)funding_key) == 32);
        memcpy(funding_key_ref.bytes, (uint8_t*)(funding_key + 4), 32);
@@ -7546,9 +10120,10 @@ uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_new(int8
        LDKThirtyTwoBytes commitment_seed_ref;
        CHECK(*((uint32_t*)commitment_seed) == 32);
        memcpy(commitment_seed_ref.data, (uint8_t*)(commitment_seed + 4), 32);
-       LDKC2Tuple_u64u64Z key_derivation_params_conv = *(LDKC2Tuple_u64u64Z*)(((uint64_t)key_derivation_params) & ~1);
-       FREE((void*)key_derivation_params);
-       LDKInMemoryChannelKeys ret_var = InMemoryChannelKeys_new(funding_key_ref, revocation_base_key_ref, payment_key_ref, delayed_payment_base_key_ref, htlc_base_key_ref, commitment_seed_ref, channel_value_satoshis, key_derivation_params_conv);
+       LDKThirtyTwoBytes channel_keys_id_ref;
+       CHECK(*((uint32_t*)channel_keys_id) == 32);
+       memcpy(channel_keys_id_ref.data, (uint8_t*)(channel_keys_id + 4), 32);
+       LDKInMemorySigner ret_var = InMemorySigner_new(funding_key_ref, revocation_base_key_ref, payment_key_ref, delayed_payment_base_key_ref, htlc_base_key_ref, commitment_seed_ref, channel_value_satoshis, channel_keys_id_ref);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7558,11 +10133,11 @@ uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_new(int8
        return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_counterparty_pubkeys(uint32_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+uint32_t  __attribute__((visibility("default"))) TS_InMemorySigner_counterparty_pubkeys(uint32_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKChannelPublicKeys ret_var = InMemoryChannelKeys_counterparty_pubkeys(&this_arg_conv);
+       LDKChannelPublicKeys ret_var = InMemorySigner_counterparty_pubkeys(&this_arg_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7572,35 +10147,35 @@ uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_counterp
        return ret_ref;
 }
 
-int16_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_counterparty_selected_contest_delay(uint32_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+int16_t  __attribute__((visibility("default"))) TS_InMemorySigner_counterparty_selected_contest_delay(uint32_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       int16_t ret_val = InMemoryChannelKeys_counterparty_selected_contest_delay(&this_arg_conv);
+       int16_t ret_val = InMemorySigner_counterparty_selected_contest_delay(&this_arg_conv);
        return ret_val;
 }
 
-int16_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_holder_selected_contest_delay(uint32_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+int16_t  __attribute__((visibility("default"))) TS_InMemorySigner_holder_selected_contest_delay(uint32_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       int16_t ret_val = InMemoryChannelKeys_holder_selected_contest_delay(&this_arg_conv);
+       int16_t ret_val = InMemorySigner_holder_selected_contest_delay(&this_arg_conv);
        return ret_val;
 }
 
-jboolean  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_is_outbound(uint32_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+jboolean  __attribute__((visibility("default"))) TS_InMemorySigner_is_outbound(uint32_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       jboolean ret_val = InMemoryChannelKeys_is_outbound(&this_arg_conv);
+       jboolean ret_val = InMemorySigner_is_outbound(&this_arg_conv);
        return ret_val;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_funding_outpoint(uint32_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+uint32_t  __attribute__((visibility("default"))) TS_InMemorySigner_funding_outpoint(uint32_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKOutPoint ret_var = InMemoryChannelKeys_funding_outpoint(&this_arg_conv);
+       LDKOutPoint ret_var = InMemorySigner_funding_outpoint(&this_arg_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7610,11 +10185,11 @@ uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_funding_
        return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_get_channel_parameters(uint32_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+uint32_t  __attribute__((visibility("default"))) TS_InMemorySigner_get_channel_parameters(uint32_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKChannelTransactionParameters ret_var = InMemoryChannelKeys_get_channel_parameters(&this_arg_conv);
+       LDKChannelTransactionParameters ret_var = InMemorySigner_get_channel_parameters(&this_arg_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7624,32 +10199,66 @@ uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_get_chan
        return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_as_ChannelKeys(uint32_t this_arg) {
-       LDKInMemoryChannelKeys this_arg_conv;
+uint32_t  __attribute__((visibility("default"))) TS_InMemorySigner_sign_counterparty_payment_input(uint32_t this_arg, int8_tArray spend_tx, int64_t input_idx, uint32_t descriptor) {
+       LDKInMemorySigner this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKTransaction spend_tx_ref;
+       spend_tx_ref.datalen = *((uint32_t*)spend_tx);
+       spend_tx_ref.data = MALLOC(spend_tx_ref.datalen, "LDKTransaction Bytes");
+       memcpy(spend_tx_ref.data, (uint8_t*)(spend_tx + 4), spend_tx_ref.datalen);
+       spend_tx_ref.data_is_owned = true;
+       LDKStaticPaymentOutputDescriptor descriptor_conv;
+       descriptor_conv.inner = (void*)(descriptor & (~1));
+       descriptor_conv.is_owned = false;
+       LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+       *ret_conv = InMemorySigner_sign_counterparty_payment_input(&this_arg_conv, spend_tx_ref, input_idx, &descriptor_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_InMemorySigner_sign_dynamic_p2wsh_input(uint32_t this_arg, int8_tArray spend_tx, int64_t input_idx, uint32_t descriptor) {
+       LDKInMemorySigner this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKTransaction spend_tx_ref;
+       spend_tx_ref.datalen = *((uint32_t*)spend_tx);
+       spend_tx_ref.data = MALLOC(spend_tx_ref.datalen, "LDKTransaction Bytes");
+       memcpy(spend_tx_ref.data, (uint8_t*)(spend_tx + 4), spend_tx_ref.datalen);
+       spend_tx_ref.data_is_owned = true;
+       LDKDelayedPaymentOutputDescriptor descriptor_conv;
+       descriptor_conv.inner = (void*)(descriptor & (~1));
+       descriptor_conv.is_owned = false;
+       LDKCResult_CVec_CVec_u8ZZNoneZ* ret_conv = MALLOC(sizeof(LDKCResult_CVec_CVec_u8ZZNoneZ), "LDKCResult_CVec_CVec_u8ZZNoneZ");
+       *ret_conv = InMemorySigner_sign_dynamic_p2wsh_input(&this_arg_conv, spend_tx_ref, input_idx, &descriptor_conv);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_InMemorySigner_as_Sign(uint32_t this_arg) {
+       LDKInMemorySigner this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKChannelKeys* ret = MALLOC(sizeof(LDKChannelKeys), "LDKChannelKeys");
-       *ret = InMemoryChannelKeys_as_ChannelKeys(&this_arg_conv);
+       LDKSign* ret = MALLOC(sizeof(LDKSign), "LDKSign");
+       *ret = InMemorySigner_as_Sign(&this_arg_conv);
        return (long)ret;
 }
 
-int8_tArray  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_write(uint32_t obj) {
-       LDKInMemoryChannelKeys obj_conv;
+int8_tArray  __attribute__((visibility("default"))) TS_InMemorySigner_write(uint32_t obj) {
+       LDKInMemorySigner obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = InMemoryChannelKeys_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = InMemorySigner_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_InMemoryChannelKeys_read(int8_tArray ser) {
+uint32_t  __attribute__((visibility("default"))) TS_InMemorySigner_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKCResult_InMemoryChannelKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemoryChannelKeysDecodeErrorZ), "LDKCResult_InMemoryChannelKeysDecodeErrorZ");
-       *ret_conv = InMemoryChannelKeys_read(ser_ref);
+       LDKCResult_InMemorySignerDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InMemorySignerDecodeErrorZ), "LDKCResult_InMemorySignerDecodeErrorZ");
+       *ret_conv = InMemorySigner_read(ser_ref);
        return (long)ret_conv;
 }
 
@@ -7660,13 +10269,12 @@ void  __attribute__((visibility("default"))) TS_KeysManager_free(uint32_t this_p
        KeysManager_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_KeysManager_new(int8_tArray seed, uint32_t network, int64_t starting_time_secs, int32_t starting_time_nanos) {
+uint32_t  __attribute__((visibility("default"))) TS_KeysManager_new(int8_tArray seed, int64_t starting_time_secs, int32_t starting_time_nanos) {
        unsigned char seed_arr[32];
        CHECK(*((uint32_t*)seed) == 32);
        memcpy(seed_arr, (uint8_t*)(seed + 4), 32);
        unsigned char (*seed_ref)[32] = &seed_arr;
-       LDKNetwork network_conv = LDKNetwork_from_js(network);
-       LDKKeysManager ret_var = KeysManager_new(seed_ref, network_conv, starting_time_secs, starting_time_nanos);
+       LDKKeysManager ret_var = KeysManager_new(seed_ref, starting_time_secs, starting_time_nanos);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7676,11 +10284,15 @@ uint32_t  __attribute__((visibility("default"))) TS_KeysManager_new(int8_tArray
        return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_KeysManager_derive_channel_keys(uint32_t this_arg, int64_t channel_value_satoshis, int64_t params_1, int64_t params_2) {
+uint32_t  __attribute__((visibility("default"))) TS_KeysManager_derive_channel_keys(uint32_t this_arg, int64_t channel_value_satoshis, int8_tArray params) {
        LDKKeysManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       LDKInMemoryChannelKeys ret_var = KeysManager_derive_channel_keys(&this_arg_conv, channel_value_satoshis, params_1, params_2);
+       unsigned char params_arr[32];
+       CHECK(*((uint32_t*)params) == 32);
+       memcpy(params_arr, (uint8_t*)(params + 4), 32);
+       unsigned char (*params_ref)[32] = &params_arr;
+       LDKInMemorySigner ret_var = KeysManager_derive_channel_keys(&this_arg_conv, channel_value_satoshis, params_ref);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7690,6 +10302,45 @@ uint32_t  __attribute__((visibility("default"))) TS_KeysManager_derive_channel_k
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_KeysManager_spend_spendable_outputs(uint32_t this_arg, uint32_tArray descriptors, uint32_tArray outputs, int8_tArray change_destination_script, int32_t feerate_sat_per_1000_weight) {
+       LDKKeysManager this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKCVec_SpendableOutputDescriptorZ descriptors_constr;
+       descriptors_constr.datalen = *((uint32_t*)descriptors);
+       if (descriptors_constr.datalen > 0)
+               descriptors_constr.data = MALLOC(descriptors_constr.datalen * sizeof(LDKSpendableOutputDescriptor), "LDKCVec_SpendableOutputDescriptorZ Elements");
+       else
+               descriptors_constr.data = NULL;
+       uint32_t* descriptors_vals = (uint32_t*)(descriptors + 4);
+       for (size_t b = 0; b < descriptors_constr.datalen; b++) {
+               uint32_t descriptors_conv_27 = descriptors_vals[b];
+               LDKSpendableOutputDescriptor descriptors_conv_27_conv = *(LDKSpendableOutputDescriptor*)(((uint64_t)descriptors_conv_27) & ~1);
+               FREE((void*)descriptors_conv_27);
+               descriptors_constr.data[b] = descriptors_conv_27_conv;
+       }
+       LDKCVec_TxOutZ outputs_constr;
+       outputs_constr.datalen = *((uint32_t*)outputs);
+       if (outputs_constr.datalen > 0)
+               outputs_constr.data = MALLOC(outputs_constr.datalen * sizeof(LDKTxOut), "LDKCVec_TxOutZ Elements");
+       else
+               outputs_constr.data = NULL;
+       uint32_t* outputs_vals = (uint32_t*)(outputs + 4);
+       for (size_t h = 0; h < outputs_constr.datalen; h++) {
+               uint32_t outputs_conv_7 = outputs_vals[h];
+               LDKTxOut outputs_conv_7_conv = *(LDKTxOut*)(((uint64_t)outputs_conv_7) & ~1);
+               FREE((void*)outputs_conv_7);
+               outputs_constr.data[h] = outputs_conv_7_conv;
+       }
+       LDKCVec_u8Z change_destination_script_ref;
+       change_destination_script_ref.datalen = *((uint32_t*)change_destination_script);
+       change_destination_script_ref.data = MALLOC(change_destination_script_ref.datalen, "LDKCVec_u8Z Bytes");
+       memcpy(change_destination_script_ref.data, (uint8_t*)(change_destination_script + 4), change_destination_script_ref.datalen);
+       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);
+       return (long)ret_conv;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_KeysManager_as_KeysInterface(uint32_t this_arg) {
        LDKKeysManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -7706,18 +10357,69 @@ void  __attribute__((visibility("default"))) TS_ChannelManager_free(uint32_t thi
        ChannelManager_free(this_ptr_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelDetails_free(uint32_t this_ptr) {
-       LDKChannelDetails this_ptr_conv;
+void  __attribute__((visibility("default"))) TS_ChainParameters_free(uint32_t this_ptr) {
+       LDKChainParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelDetails_free(this_ptr_conv);
+       ChainParameters_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelDetails_clone(uint32_t orig) {
-       LDKChannelDetails orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelDetails ret_var = ChannelDetails_clone(&orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_ChainParameters_get_network(uint32_t this_ptr) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       uint32_t ret_conv = LDKNetwork_to_js(ChainParameters_get_network(&this_ptr_conv));
+       return ret_conv;
+}
+
+void  __attribute__((visibility("default"))) TS_ChainParameters_set_network(uint32_t this_ptr, uint32_t val) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKNetwork val_conv = LDKNetwork_from_js(val);
+       ChainParameters_set_network(&this_ptr_conv, val_conv);
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_ChainParameters_get_latest_hash(uint32_t this_ptr) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), *ChainParameters_get_latest_hash(&this_ptr_conv), 32);
+       return ret_arr;
+}
+
+void  __attribute__((visibility("default"))) TS_ChainParameters_set_latest_hash(uint32_t this_ptr, int8_tArray val) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKThirtyTwoBytes val_ref;
+       CHECK(*((uint32_t*)val) == 32);
+       memcpy(val_ref.data, (uint8_t*)(val + 4), 32);
+       ChainParameters_set_latest_hash(&this_ptr_conv, val_ref);
+}
+
+int64_t  __attribute__((visibility("default"))) TS_ChainParameters_get_latest_height(uint32_t this_ptr) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       int64_t ret_val = ChainParameters_get_latest_height(&this_ptr_conv);
+       return ret_val;
+}
+
+void  __attribute__((visibility("default"))) TS_ChainParameters_set_latest_height(uint32_t this_ptr, int64_t val) {
+       LDKChainParameters this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       ChainParameters_set_latest_height(&this_ptr_conv, val);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ChainParameters_new(uint32_t network_arg, int8_tArray latest_hash_arg, int64_t latest_height_arg) {
+       LDKNetwork network_arg_conv = LDKNetwork_from_js(network_arg);
+       LDKThirtyTwoBytes latest_hash_arg_ref;
+       CHECK(*((uint32_t*)latest_hash_arg) == 32);
+       memcpy(latest_hash_arg_ref.data, (uint8_t*)(latest_hash_arg + 4), 32);
+       LDKChainParameters ret_var = ChainParameters_new(network_arg_conv, latest_hash_arg_ref, latest_height_arg);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7727,6 +10429,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelDetails_clone(uint32_
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelDetails_free(uint32_t this_ptr) {
+       LDKChannelDetails this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelDetails_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelDetails_get_channel_id(uint32_t this_ptr) {
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -7750,9 +10459,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelDetails_get_remote
        LDKChannelDetails this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelDetails_get_remote_network_id(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelDetails_get_remote_network_id(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelDetails_set_remote_network_id(uint32_t this_ptr, int8_tArray val) {
@@ -7786,7 +10495,7 @@ void  __attribute__((visibility("default"))) TS_ChannelDetails_set_counterparty_
        LDKInitFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKInitFeatures
+       val_conv = InitFeatures_clone(&val_conv);
        ChannelDetails_set_counterparty_features(&this_ptr_conv, val_conv);
 }
 
@@ -7865,18 +10574,11 @@ void  __attribute__((visibility("default"))) TS_ChannelDetails_set_is_live(uint3
        ChannelDetails_set_is_live(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_PaymentSendFailure_free(uint32_t this_ptr) {
-       LDKPaymentSendFailure this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       PaymentSendFailure_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_PaymentSendFailure_clone(uint32_t orig) {
-       LDKPaymentSendFailure orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ChannelDetails_clone(uint32_t orig) {
+       LDKChannelDetails orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKPaymentSendFailure ret_var = PaymentSendFailure_clone(&orig_conv);
+       LDKChannelDetails ret_var = ChannelDetails_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7886,8 +10588,22 @@ uint32_t  __attribute__((visibility("default"))) TS_PaymentSendFailure_clone(uin
        return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelManager_new(uint32_t network, uint32_t fee_est, uint32_t chain_monitor, uint32_t tx_broadcaster, uint32_t logger, uint32_t keys_manager, uint32_t config, int64_t current_blockchain_height) {
-       LDKNetwork network_conv = LDKNetwork_from_js(network);
+void  __attribute__((visibility("default"))) TS_PaymentSendFailure_free(uint32_t this_ptr) {
+       if ((this_ptr & 1) != 0) return;
+       LDKPaymentSendFailure this_ptr_conv = *(LDKPaymentSendFailure*)(((uint64_t)this_ptr) & ~1);
+       FREE((void*)this_ptr);
+       PaymentSendFailure_free(this_ptr_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_PaymentSendFailure_clone(uint32_t orig) {
+       LDKPaymentSendFailure* orig_conv = (LDKPaymentSendFailure*)orig;
+       LDKPaymentSendFailure *ret_copy = MALLOC(sizeof(LDKPaymentSendFailure), "LDKPaymentSendFailure");
+       *ret_copy = PaymentSendFailure_clone(orig_conv);
+       long ret_ref = (long)ret_copy;
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ChannelManager_new(uint32_t fee_est, uint32_t chain_monitor, uint32_t tx_broadcaster, uint32_t logger, uint32_t keys_manager, uint32_t config, uint32_t params) {
        LDKFeeEstimator fee_est_conv = *(LDKFeeEstimator*)(((uint64_t)fee_est) & ~1);
        LDKWatch chain_monitor_conv = *(LDKWatch*)(((uint64_t)chain_monitor) & ~1);
        LDKBroadcasterInterface tx_broadcaster_conv = *(LDKBroadcasterInterface*)(((uint64_t)tx_broadcaster) & ~1);
@@ -7897,7 +10613,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelManager_new(uint32_t
        config_conv.inner = (void*)(config & (~1));
        config_conv.is_owned = (config & 1) || (config == 0);
        config_conv = UserConfig_clone(&config_conv);
-       LDKChannelManager ret_var = ChannelManager_new(network_conv, fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, current_blockchain_height);
+       LDKChainParameters params_conv;
+       params_conv.inner = (void*)(params & (~1));
+       params_conv.is_owned = (params & 1) || (params == 0);
+       // Warning: we need a move here but no clone is available for LDKChainParameters
+       LDKChannelManager ret_var = ChannelManager_new(fee_est_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, keys_manager_conv, config_conv, params_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -7931,14 +10651,14 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelManager_list_cha
        uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
        uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
        for (size_t q = 0; q < ret_var.datalen; q++) {
-               LDKChannelDetails arr_conv_16_var = ret_var.data[q];
-               CHECK((((long)arr_conv_16_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_16_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_16_ref = (long)arr_conv_16_var.inner;
-               if (arr_conv_16_var.is_owned) {
-                       arr_conv_16_ref |= 1;
+               LDKChannelDetails ret_conv_16_var = ret_var.data[q];
+               CHECK((((long)ret_conv_16_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+               CHECK((((long)&ret_conv_16_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+               long ret_conv_16_ref = (long)ret_conv_16_var.inner;
+               if (ret_conv_16_var.is_owned) {
+                       ret_conv_16_ref |= 1;
                }
-               ret_arr_ptr[q] = arr_conv_16_ref;
+               ret_arr_ptr[q] = ret_conv_16_ref;
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -7952,14 +10672,14 @@ uint32_tArray  __attribute__((visibility("default"))) TS_ChannelManager_list_usa
        uint32_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native uint32_tArray Bytes");
        uint32_t *ret_arr_ptr = (uint32_t*)(ret_arr + 4);
        for (size_t q = 0; q < ret_var.datalen; q++) {
-               LDKChannelDetails arr_conv_16_var = ret_var.data[q];
-               CHECK((((long)arr_conv_16_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-               CHECK((((long)&arr_conv_16_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-               long arr_conv_16_ref = (long)arr_conv_16_var.inner;
-               if (arr_conv_16_var.is_owned) {
-                       arr_conv_16_ref |= 1;
+               LDKChannelDetails ret_conv_16_var = ret_var.data[q];
+               CHECK((((long)ret_conv_16_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+               CHECK((((long)&ret_conv_16_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+               long ret_conv_16_ref = (long)ret_conv_16_var.inner;
+               if (ret_conv_16_var.is_owned) {
+                       ret_conv_16_ref |= 1;
                }
-               ret_arr_ptr[q] = arr_conv_16_ref;
+               ret_arr_ptr[q] = ret_conv_16_ref;
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -8049,10 +10769,10 @@ void  __attribute__((visibility("default"))) TS_ChannelManager_broadcast_node_an
                addresses_constr.data = NULL;
        uint32_t* addresses_vals = (uint32_t*)(addresses + 4);
        for (size_t m = 0; m < addresses_constr.datalen; m++) {
-               uint32_t arr_conv_12 = addresses_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               addresses_constr.data[m] = arr_conv_12_conv;
+               uint32_t addresses_conv_12 = addresses_vals[m];
+               LDKNetAddress addresses_conv_12_conv = *(LDKNetAddress*)(((uint64_t)addresses_conv_12) & ~1);
+               FREE((void*)addresses_conv_12);
+               addresses_constr.data[m] = addresses_conv_12_conv;
        }
        ChannelManager_broadcast_node_announcement(&this_arg_conv, rgb_ref, alias_ref, addresses_constr);
 }
@@ -8104,9 +10824,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelManager_get_our_no
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelManager_get_our_node_id(&this_arg_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelManager_get_our_node_id(&this_arg_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelManager_channel_monitor_updated(uint32_t this_arg, uint32_t funding_txo, int64_t highest_applied_update_id) {
@@ -8137,6 +10857,15 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelManager_as_EventsProv
        return (long)ret;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelManager_as_Listen(uint32_t this_arg) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKListen* ret = MALLOC(sizeof(LDKListen), "LDKListen");
+       *ret = ChannelManager_as_Listen(&this_arg_conv);
+       return (long)ret;
+}
+
 void  __attribute__((visibility("default"))) TS_ChannelManager_block_connected(uint32_t this_arg, int8_tArray header, uint32_tArray txdata, int32_t height) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -8153,10 +10882,10 @@ void  __attribute__((visibility("default"))) TS_ChannelManager_block_connected(u
                txdata_constr.data = NULL;
        uint32_t* txdata_vals = (uint32_t*)(txdata + 4);
        for (size_t e = 0; e < txdata_constr.datalen; e++) {
-               uint32_t arr_conv_30 = txdata_vals[e];
-               LDKC2Tuple_usizeTransactionZ arr_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)arr_conv_30) & ~1);
-               FREE((void*)arr_conv_30);
-               txdata_constr.data[e] = arr_conv_30_conv;
+               uint32_t txdata_conv_30 = txdata_vals[e];
+               LDKC2Tuple_usizeTransactionZ txdata_conv_30_conv = *(LDKC2Tuple_usizeTransactionZ*)(((uint64_t)txdata_conv_30) & ~1);
+               FREE((void*)txdata_conv_30);
+               txdata_constr.data[e] = txdata_conv_30_conv;
        }
        ChannelManager_block_connected(&this_arg_conv, header_ref, txdata_constr, height);
 }
@@ -8172,6 +10901,13 @@ void  __attribute__((visibility("default"))) TS_ChannelManager_block_disconnecte
        ChannelManager_block_disconnected(&this_arg_conv, header_ref);
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelManager_await_persistable_update(uint32_t this_arg) {
+       LDKChannelManager this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       ChannelManager_await_persistable_update(&this_arg_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_ChannelManager_as_ChannelMessageHandler(uint32_t this_arg) {
        LDKChannelManager this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -8185,11 +10921,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelManager_write(uint
        LDKChannelManager obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelManager_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelManager_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelManagerReadArgs_free(uint32_t this_ptr) {
@@ -8322,11 +11058,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelManagerReadArgs_new(u
                channel_monitors_constr.data = NULL;
        uint32_t* channel_monitors_vals = (uint32_t*)(channel_monitors + 4);
        for (size_t q = 0; q < channel_monitors_constr.datalen; q++) {
-               uint32_t arr_conv_16 = channel_monitors_vals[q];
-               LDKChannelMonitor arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               channel_monitors_constr.data[q] = arr_conv_16_conv;
+               uint32_t channel_monitors_conv_16 = channel_monitors_vals[q];
+               LDKChannelMonitor channel_monitors_conv_16_conv;
+               channel_monitors_conv_16_conv.inner = (void*)(channel_monitors_conv_16 & (~1));
+               channel_monitors_conv_16_conv.is_owned = (channel_monitors_conv_16 & 1) || (channel_monitors_conv_16 == 0);
+               channel_monitors_constr.data[q] = channel_monitors_conv_16_conv;
        }
        LDKChannelManagerReadArgs ret_var = ChannelManagerReadArgs_new(keys_manager_conv, fee_estimator_conv, chain_monitor_conv, tx_broadcaster_conv, logger_conv, default_config_conv, channel_monitors_constr);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -8379,11 +11115,11 @@ void  __attribute__((visibility("default"))) TS_Init_free(uint32_t this_ptr) {
        Init_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_Init_clone(uint32_t orig) {
-       LDKInit orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKInit ret_var = Init_clone(&orig_conv);
+uint32_t  __attribute__((visibility("default"))) TS_Init_get_features(uint32_t this_ptr) {
+       LDKInit this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = false;
+       LDKInitFeatures ret_var = Init_get_features(&this_ptr_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8393,18 +11129,37 @@ uint32_t  __attribute__((visibility("default"))) TS_Init_clone(uint32_t orig) {
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ErrorMessage_free(uint32_t this_ptr) {
-       LDKErrorMessage this_ptr_conv;
+void  __attribute__((visibility("default"))) TS_Init_set_features(uint32_t this_ptr, uint32_t val) {
+       LDKInit this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ErrorMessage_free(this_ptr_conv);
+       this_ptr_conv.is_owned = false;
+       LDKInitFeatures val_conv;
+       val_conv.inner = (void*)(val & (~1));
+       val_conv.is_owned = (val & 1) || (val == 0);
+       val_conv = InitFeatures_clone(&val_conv);
+       Init_set_features(&this_ptr_conv, val_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ErrorMessage_clone(uint32_t orig) {
-       LDKErrorMessage orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_Init_new(uint32_t features_arg) {
+       LDKInitFeatures features_arg_conv;
+       features_arg_conv.inner = (void*)(features_arg & (~1));
+       features_arg_conv.is_owned = (features_arg & 1) || (features_arg == 0);
+       features_arg_conv = InitFeatures_clone(&features_arg_conv);
+       LDKInit ret_var = Init_new(features_arg_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_Init_clone(uint32_t orig) {
+       LDKInit orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKErrorMessage ret_var = ErrorMessage_clone(&orig_conv);
+       LDKInit ret_var = Init_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8414,6 +11169,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ErrorMessage_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ErrorMessage_free(uint32_t this_ptr) {
+       LDKErrorMessage this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ErrorMessage_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ErrorMessage_get_channel_id(uint32_t this_ptr) {
        LDKErrorMessage this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8471,18 +11233,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ErrorMessage_new(int8_tArray
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_Ping_free(uint32_t this_ptr) {
-       LDKPing this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Ping_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_Ping_clone(uint32_t orig) {
-       LDKPing orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ErrorMessage_clone(uint32_t orig) {
+       LDKErrorMessage orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKPing ret_var = Ping_clone(&orig_conv);
+       LDKErrorMessage ret_var = ErrorMessage_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8492,6 +11247,13 @@ uint32_t  __attribute__((visibility("default"))) TS_Ping_clone(uint32_t orig) {
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_Ping_free(uint32_t this_ptr) {
+       LDKPing this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Ping_free(this_ptr_conv);
+}
+
 int16_t  __attribute__((visibility("default"))) TS_Ping_get_ponglen(uint32_t this_ptr) {
        LDKPing this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8533,18 +11295,11 @@ uint32_t  __attribute__((visibility("default"))) TS_Ping_new(int16_t ponglen_arg
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_Pong_free(uint32_t this_ptr) {
-       LDKPong this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Pong_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_Pong_clone(uint32_t orig) {
-       LDKPong orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_Ping_clone(uint32_t orig) {
+       LDKPing orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKPong ret_var = Pong_clone(&orig_conv);
+       LDKPing ret_var = Ping_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8554,6 +11309,13 @@ uint32_t  __attribute__((visibility("default"))) TS_Pong_clone(uint32_t orig) {
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_Pong_free(uint32_t this_ptr) {
+       LDKPong this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Pong_free(this_ptr_conv);
+}
+
 int16_t  __attribute__((visibility("default"))) TS_Pong_get_byteslen(uint32_t this_ptr) {
        LDKPong this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8580,18 +11342,11 @@ uint32_t  __attribute__((visibility("default"))) TS_Pong_new(int16_t byteslen_ar
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_OpenChannel_free(uint32_t this_ptr) {
-       LDKOpenChannel this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       OpenChannel_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_OpenChannel_clone(uint32_t orig) {
-       LDKOpenChannel orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_Pong_clone(uint32_t orig) {
+       LDKPong orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv);
+       LDKPong ret_var = Pong_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8601,6 +11356,13 @@ uint32_t  __attribute__((visibility("default"))) TS_OpenChannel_clone(uint32_t o
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_OpenChannel_free(uint32_t this_ptr) {
+       LDKOpenChannel this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       OpenChannel_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_OpenChannel_get_chain_hash(uint32_t this_ptr) {
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -8778,9 +11540,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_OpenChannel_get_funding_p
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), OpenChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_OpenChannel_set_funding_pubkey(uint32_t this_ptr, int8_tArray val) {
@@ -8797,9 +11559,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_OpenChannel_get_revocatio
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), OpenChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_OpenChannel_set_revocation_basepoint(uint32_t this_ptr, int8_tArray val) {
@@ -8816,9 +11578,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_OpenChannel_get_payment_p
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), OpenChannel_get_payment_point(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), OpenChannel_get_payment_point(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_OpenChannel_set_payment_point(uint32_t this_ptr, int8_tArray val) {
@@ -8835,9 +11597,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_OpenChannel_get_delayed_p
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), OpenChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_OpenChannel_set_delayed_payment_basepoint(uint32_t this_ptr, int8_tArray val) {
@@ -8854,9 +11616,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_OpenChannel_get_htlc_base
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), OpenChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_OpenChannel_set_htlc_basepoint(uint32_t this_ptr, int8_tArray val) {
@@ -8873,9 +11635,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_OpenChannel_get_first_per
        LDKOpenChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), OpenChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_OpenChannel_set_first_per_commitment_point(uint32_t this_ptr, int8_tArray val) {
@@ -8903,18 +11665,11 @@ void  __attribute__((visibility("default"))) TS_OpenChannel_set_channel_flags(ui
        OpenChannel_set_channel_flags(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_AcceptChannel_free(uint32_t this_ptr) {
-       LDKAcceptChannel this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       AcceptChannel_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_AcceptChannel_clone(uint32_t orig) {
-       LDKAcceptChannel orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_OpenChannel_clone(uint32_t orig) {
+       LDKOpenChannel orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKAcceptChannel ret_var = AcceptChannel_clone(&orig_conv);
+       LDKOpenChannel ret_var = OpenChannel_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -8924,6 +11679,13 @@ uint32_t  __attribute__((visibility("default"))) TS_AcceptChannel_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_AcceptChannel_free(uint32_t this_ptr) {
+       LDKAcceptChannel this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       AcceptChannel_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_AcceptChannel_get_temporary_channel_id(uint32_t this_ptr) {
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9052,9 +11814,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_AcceptChannel_get_funding
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), AcceptChannel_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_AcceptChannel_set_funding_pubkey(uint32_t this_ptr, int8_tArray val) {
@@ -9071,9 +11833,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_AcceptChannel_get_revocat
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), AcceptChannel_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_AcceptChannel_set_revocation_basepoint(uint32_t this_ptr, int8_tArray val) {
@@ -9090,9 +11852,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_AcceptChannel_get_payment
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), AcceptChannel_get_payment_point(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_AcceptChannel_set_payment_point(uint32_t this_ptr, int8_tArray val) {
@@ -9109,9 +11871,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_AcceptChannel_get_delayed
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), AcceptChannel_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_AcceptChannel_set_delayed_payment_basepoint(uint32_t this_ptr, int8_tArray val) {
@@ -9128,9 +11890,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_AcceptChannel_get_htlc_ba
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), AcceptChannel_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_AcceptChannel_set_htlc_basepoint(uint32_t this_ptr, int8_tArray val) {
@@ -9147,33 +11909,26 @@ int8_tArray  __attribute__((visibility("default"))) TS_AcceptChannel_get_first_p
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), AcceptChannel_get_first_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_AcceptChannel_set_first_per_commitment_point(uint32_t this_ptr, int8_tArray val) {
        LDKAcceptChannel this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       LDKPublicKey val_ref;
-       CHECK(*((uint32_t*)val) == 33);
-       memcpy(val_ref.compressed_form, (uint8_t*)(val + 4), 33);
-       AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
-}
-
-void  __attribute__((visibility("default"))) TS_FundingCreated_free(uint32_t this_ptr) {
-       LDKFundingCreated this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingCreated_free(this_ptr_conv);
+       LDKPublicKey val_ref;
+       CHECK(*((uint32_t*)val) == 33);
+       memcpy(val_ref.compressed_form, (uint8_t*)(val + 4), 33);
+       AcceptChannel_set_first_per_commitment_point(&this_ptr_conv, val_ref);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_FundingCreated_clone(uint32_t orig) {
-       LDKFundingCreated orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_AcceptChannel_clone(uint32_t orig) {
+       LDKAcceptChannel orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingCreated ret_var = FundingCreated_clone(&orig_conv);
+       LDKAcceptChannel ret_var = AcceptChannel_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9183,6 +11938,13 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingCreated_clone(uint32_
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_FundingCreated_free(uint32_t this_ptr) {
+       LDKFundingCreated this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingCreated_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_FundingCreated_get_temporary_channel_id(uint32_t this_ptr) {
        LDKFundingCreated this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9240,9 +12002,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_FundingCreated_get_signat
        LDKFundingCreated this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), FundingCreated_get_signature(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), FundingCreated_get_signature(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_FundingCreated_set_signature(uint32_t this_ptr, int8_tArray val) {
@@ -9275,18 +12037,11 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingCreated_new(int8_tArr
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_FundingSigned_free(uint32_t this_ptr) {
-       LDKFundingSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingSigned_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_FundingSigned_clone(uint32_t orig) {
-       LDKFundingSigned orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_FundingCreated_clone(uint32_t orig) {
+       LDKFundingCreated orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingSigned ret_var = FundingSigned_clone(&orig_conv);
+       LDKFundingCreated ret_var = FundingCreated_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9296,6 +12051,13 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingSigned_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_FundingSigned_free(uint32_t this_ptr) {
+       LDKFundingSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingSigned_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_FundingSigned_get_channel_id(uint32_t this_ptr) {
        LDKFundingSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9319,9 +12081,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_FundingSigned_get_signatu
        LDKFundingSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), FundingSigned_get_signature(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), FundingSigned_get_signature(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_FundingSigned_set_signature(uint32_t this_ptr, int8_tArray val) {
@@ -9351,18 +12113,11 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingSigned_new(int8_tArra
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_FundingLocked_free(uint32_t this_ptr) {
-       LDKFundingLocked this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       FundingLocked_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_FundingLocked_clone(uint32_t orig) {
-       LDKFundingLocked orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_FundingSigned_clone(uint32_t orig) {
+       LDKFundingSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKFundingLocked ret_var = FundingLocked_clone(&orig_conv);
+       LDKFundingSigned ret_var = FundingSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9372,6 +12127,13 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingLocked_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_FundingLocked_free(uint32_t this_ptr) {
+       LDKFundingLocked this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       FundingLocked_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_FundingLocked_get_channel_id(uint32_t this_ptr) {
        LDKFundingLocked this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9395,9 +12157,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_FundingLocked_get_next_pe
        LDKFundingLocked this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), FundingLocked_get_next_per_commitment_point(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), FundingLocked_get_next_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_FundingLocked_set_next_per_commitment_point(uint32_t this_ptr, int8_tArray val) {
@@ -9427,18 +12189,11 @@ uint32_t  __attribute__((visibility("default"))) TS_FundingLocked_new(int8_tArra
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_Shutdown_free(uint32_t this_ptr) {
-       LDKShutdown this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Shutdown_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_Shutdown_clone(uint32_t orig) {
-       LDKShutdown orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_FundingLocked_clone(uint32_t orig) {
+       LDKFundingLocked orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKShutdown ret_var = Shutdown_clone(&orig_conv);
+       LDKFundingLocked ret_var = FundingLocked_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9448,6 +12203,13 @@ uint32_t  __attribute__((visibility("default"))) TS_Shutdown_clone(uint32_t orig
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_Shutdown_free(uint32_t this_ptr) {
+       LDKShutdown this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Shutdown_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_Shutdown_get_channel_id(uint32_t this_ptr) {
        LDKShutdown this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9471,10 +12233,10 @@ int8_tArray  __attribute__((visibility("default"))) TS_Shutdown_get_scriptpubkey
        LDKShutdown this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       LDKu8slice arg_var = Shutdown_get_scriptpubkey(&this_ptr_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       return arg_arr;
+       LDKu8slice ret_var = Shutdown_get_scriptpubkey(&this_ptr_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_Shutdown_set_scriptpubkey(uint32_t this_ptr, int8_tArray val) {
@@ -9506,18 +12268,11 @@ uint32_t  __attribute__((visibility("default"))) TS_Shutdown_new(int8_tArray cha
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ClosingSigned_free(uint32_t this_ptr) {
-       LDKClosingSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ClosingSigned_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ClosingSigned_clone(uint32_t orig) {
-       LDKClosingSigned orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_Shutdown_clone(uint32_t orig) {
+       LDKShutdown orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKClosingSigned ret_var = ClosingSigned_clone(&orig_conv);
+       LDKShutdown ret_var = Shutdown_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9527,6 +12282,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ClosingSigned_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ClosingSigned_free(uint32_t this_ptr) {
+       LDKClosingSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ClosingSigned_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ClosingSigned_get_channel_id(uint32_t this_ptr) {
        LDKClosingSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9565,9 +12327,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ClosingSigned_get_signatu
        LDKClosingSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ClosingSigned_get_signature(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ClosingSigned_get_signature(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ClosingSigned_set_signature(uint32_t this_ptr, int8_tArray val) {
@@ -9597,18 +12359,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ClosingSigned_new(int8_tArra
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_UpdateAddHTLC_free(uint32_t this_ptr) {
-       LDKUpdateAddHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateAddHTLC_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UpdateAddHTLC_clone(uint32_t orig) {
-       LDKUpdateAddHTLC orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ClosingSigned_clone(uint32_t orig) {
+       LDKClosingSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_clone(&orig_conv);
+       LDKClosingSigned ret_var = ClosingSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9618,6 +12373,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateAddHTLC_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UpdateAddHTLC_free(uint32_t this_ptr) {
+       LDKUpdateAddHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateAddHTLC_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateAddHTLC_get_channel_id(uint32_t this_ptr) {
        LDKUpdateAddHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9701,18 +12463,11 @@ void  __attribute__((visibility("default"))) TS_UpdateAddHTLC_set_cltv_expiry(ui
        UpdateAddHTLC_set_cltv_expiry(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_free(uint32_t this_ptr) {
-       LDKUpdateFulfillHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFulfillHTLC_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_clone(uint32_t orig) {
-       LDKUpdateFulfillHTLC orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UpdateAddHTLC_clone(uint32_t orig) {
+       LDKUpdateAddHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_clone(&orig_conv);
+       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9722,6 +12477,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_clone(uint
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_free(uint32_t this_ptr) {
+       LDKUpdateFulfillHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFulfillHTLC_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_get_channel_id(uint32_t this_ptr) {
        LDKUpdateFulfillHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9792,18 +12554,11 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_new(int8_t
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_UpdateFailHTLC_free(uint32_t this_ptr) {
-       LDKUpdateFailHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFailHTLC_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UpdateFailHTLC_clone(uint32_t orig) {
-       LDKUpdateFailHTLC orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_clone(uint32_t orig) {
+       LDKUpdateFulfillHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_clone(&orig_conv);
+       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9813,6 +12568,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFailHTLC_clone(uint32_
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UpdateFailHTLC_free(uint32_t this_ptr) {
+       LDKUpdateFailHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFailHTLC_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFailHTLC_get_channel_id(uint32_t this_ptr) {
        LDKUpdateFailHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9847,18 +12609,11 @@ void  __attribute__((visibility("default"))) TS_UpdateFailHTLC_set_htlc_id(uint3
        UpdateFailHTLC_set_htlc_id(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_free(uint32_t this_ptr) {
-       LDKUpdateFailMalformedHTLC this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFailMalformedHTLC_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_clone(uint32_t orig) {
-       LDKUpdateFailMalformedHTLC orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UpdateFailHTLC_clone(uint32_t orig) {
+       LDKUpdateFailHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_clone(&orig_conv);
+       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9868,6 +12623,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_clon
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_free(uint32_t this_ptr) {
+       LDKUpdateFailMalformedHTLC this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFailMalformedHTLC_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_get_channel_id(uint32_t this_ptr) {
        LDKUpdateFailMalformedHTLC this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9917,18 +12679,11 @@ void  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_set_fail
        UpdateFailMalformedHTLC_set_failure_code(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_CommitmentSigned_free(uint32_t this_ptr) {
-       LDKCommitmentSigned this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       CommitmentSigned_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_clone(uint32_t orig) {
-       LDKCommitmentSigned orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_clone(uint32_t orig) {
+       LDKUpdateFailMalformedHTLC orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKCommitmentSigned ret_var = CommitmentSigned_clone(&orig_conv);
+       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -9938,6 +12693,13 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_clone(uint3
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_CommitmentSigned_free(uint32_t this_ptr) {
+       LDKCommitmentSigned this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       CommitmentSigned_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_CommitmentSigned_get_channel_id(uint32_t this_ptr) {
        LDKCommitmentSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -9961,9 +12723,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_CommitmentSigned_get_sign
        LDKCommitmentSigned this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), CommitmentSigned_get_signature(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), CommitmentSigned_get_signature(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_CommitmentSigned_set_signature(uint32_t this_ptr, int8_tArray val) {
@@ -9988,11 +12750,11 @@ void  __attribute__((visibility("default"))) TS_CommitmentSigned_set_htlc_signat
                val_constr.data = NULL;
        int8_tArray* val_vals = (int8_tArray*)(val + 4);
        for (size_t m = 0; m < val_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = val_vals[m];
-               LDKSignature arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 64);
-               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
-               val_constr.data[m] = arr_conv_12_ref;
+               int8_tArray val_conv_12 = val_vals[m];
+               LDKSignature val_conv_12_ref;
+               CHECK(*((uint32_t*)val_conv_12) == 64);
+               memcpy(val_conv_12_ref.compact_form, (uint8_t*)(val_conv_12 + 4), 64);
+               val_constr.data[m] = val_conv_12_ref;
        }
        CommitmentSigned_set_htlc_signatures(&this_ptr_conv, val_constr);
 }
@@ -10012,11 +12774,11 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_new(int8_tA
                htlc_signatures_arg_constr.data = NULL;
        int8_tArray* htlc_signatures_arg_vals = (int8_tArray*)(htlc_signatures_arg + 4);
        for (size_t m = 0; m < htlc_signatures_arg_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = htlc_signatures_arg_vals[m];
-               LDKSignature arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 64);
-               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
-               htlc_signatures_arg_constr.data[m] = arr_conv_12_ref;
+               int8_tArray htlc_signatures_arg_conv_12 = htlc_signatures_arg_vals[m];
+               LDKSignature htlc_signatures_arg_conv_12_ref;
+               CHECK(*((uint32_t*)htlc_signatures_arg_conv_12) == 64);
+               memcpy(htlc_signatures_arg_conv_12_ref.compact_form, (uint8_t*)(htlc_signatures_arg_conv_12 + 4), 64);
+               htlc_signatures_arg_constr.data[m] = htlc_signatures_arg_conv_12_ref;
        }
        LDKCommitmentSigned ret_var = CommitmentSigned_new(channel_id_arg_ref, signature_arg_ref, htlc_signatures_arg_constr);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -10028,18 +12790,11 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_new(int8_tA
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_RevokeAndACK_free(uint32_t this_ptr) {
-       LDKRevokeAndACK this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       RevokeAndACK_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_RevokeAndACK_clone(uint32_t orig) {
-       LDKRevokeAndACK orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_clone(uint32_t orig) {
+       LDKCommitmentSigned orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKRevokeAndACK ret_var = RevokeAndACK_clone(&orig_conv);
+       LDKCommitmentSigned ret_var = CommitmentSigned_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10049,6 +12804,13 @@ uint32_t  __attribute__((visibility("default"))) TS_RevokeAndACK_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_RevokeAndACK_free(uint32_t this_ptr) {
+       LDKRevokeAndACK this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       RevokeAndACK_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_RevokeAndACK_get_channel_id(uint32_t this_ptr) {
        LDKRevokeAndACK this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10091,9 +12853,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_RevokeAndACK_get_next_per
        LDKRevokeAndACK this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), RevokeAndACK_get_next_per_commitment_point(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), RevokeAndACK_get_next_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_RevokeAndACK_set_next_per_commitment_point(uint32_t this_ptr, int8_tArray val) {
@@ -10126,18 +12888,11 @@ uint32_t  __attribute__((visibility("default"))) TS_RevokeAndACK_new(int8_tArray
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_UpdateFee_free(uint32_t this_ptr) {
-       LDKUpdateFee this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UpdateFee_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UpdateFee_clone(uint32_t orig) {
-       LDKUpdateFee orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_RevokeAndACK_clone(uint32_t orig) {
+       LDKRevokeAndACK orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUpdateFee ret_var = UpdateFee_clone(&orig_conv);
+       LDKRevokeAndACK ret_var = RevokeAndACK_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10147,6 +12902,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFee_clone(uint32_t ori
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UpdateFee_free(uint32_t this_ptr) {
+       LDKUpdateFee this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UpdateFee_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFee_get_channel_id(uint32_t this_ptr) {
        LDKUpdateFee this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10195,6 +12957,20 @@ uint32_t  __attribute__((visibility("default"))) TS_UpdateFee_new(int8_tArray ch
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_UpdateFee_clone(uint32_t orig) {
+       LDKUpdateFee orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKUpdateFee ret_var = UpdateFee_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_DataLossProtect_free(uint32_t this_ptr) {
        LDKDataLossProtect this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10202,20 +12978,6 @@ void  __attribute__((visibility("default"))) TS_DataLossProtect_free(uint32_t th
        DataLossProtect_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_DataLossProtect_clone(uint32_t orig) {
-       LDKDataLossProtect orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKDataLossProtect ret_var = DataLossProtect_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_DataLossProtect_get_your_last_per_commitment_secret(uint32_t this_ptr) {
        LDKDataLossProtect this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10239,9 +13001,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_DataLossProtect_get_my_cu
        LDKDataLossProtect this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), DataLossProtect_get_my_current_per_commitment_point(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), DataLossProtect_get_my_current_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_DataLossProtect_set_my_current_per_commitment_point(uint32_t this_ptr, int8_tArray val) {
@@ -10271,18 +13033,11 @@ uint32_t  __attribute__((visibility("default"))) TS_DataLossProtect_new(int8_tAr
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelReestablish_free(uint32_t this_ptr) {
-       LDKChannelReestablish this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelReestablish_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelReestablish_clone(uint32_t orig) {
-       LDKChannelReestablish orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_DataLossProtect_clone(uint32_t orig) {
+       LDKDataLossProtect orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelReestablish ret_var = ChannelReestablish_clone(&orig_conv);
+       LDKDataLossProtect ret_var = DataLossProtect_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10292,6 +13047,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelReestablish_clone(uin
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelReestablish_free(uint32_t this_ptr) {
+       LDKChannelReestablish this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelReestablish_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelReestablish_get_channel_id(uint32_t this_ptr) {
        LDKChannelReestablish this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10341,18 +13103,11 @@ void  __attribute__((visibility("default"))) TS_ChannelReestablish_set_next_remo
        ChannelReestablish_set_next_remote_commitment_number(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_AnnouncementSignatures_free(uint32_t this_ptr) {
-       LDKAnnouncementSignatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       AnnouncementSignatures_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_AnnouncementSignatures_clone(uint32_t orig) {
-       LDKAnnouncementSignatures orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ChannelReestablish_clone(uint32_t orig) {
+       LDKChannelReestablish orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_clone(&orig_conv);
+       LDKChannelReestablish ret_var = ChannelReestablish_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10362,6 +13117,13 @@ uint32_t  __attribute__((visibility("default"))) TS_AnnouncementSignatures_clone
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_AnnouncementSignatures_free(uint32_t this_ptr) {
+       LDKAnnouncementSignatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       AnnouncementSignatures_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_AnnouncementSignatures_get_channel_id(uint32_t this_ptr) {
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10400,9 +13162,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_AnnouncementSignatures_ge
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), AnnouncementSignatures_get_node_signature(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), AnnouncementSignatures_get_node_signature(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_AnnouncementSignatures_set_node_signature(uint32_t this_ptr, int8_tArray val) {
@@ -10419,9 +13181,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_AnnouncementSignatures_ge
        LDKAnnouncementSignatures this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), AnnouncementSignatures_get_bitcoin_signature(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), AnnouncementSignatures_get_bitcoin_signature(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_AnnouncementSignatures_set_bitcoin_signature(uint32_t this_ptr, int8_tArray val) {
@@ -10454,6 +13216,20 @@ uint32_t  __attribute__((visibility("default"))) TS_AnnouncementSignatures_new(i
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_AnnouncementSignatures_clone(uint32_t orig) {
+       LDKAnnouncementSignatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_NetAddress_free(uint32_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKNetAddress this_ptr_conv = *(LDKNetAddress*)(((uint64_t)this_ptr) & ~1);
@@ -10471,11 +13247,11 @@ uint32_t  __attribute__((visibility("default"))) TS_NetAddress_clone(uint32_t or
 
 int8_tArray  __attribute__((visibility("default"))) TS_NetAddress_write(uint32_t obj) {
        LDKNetAddress* obj_conv = (LDKNetAddress*)obj;
-       LDKCVec_u8Z arg_var = NetAddress_write(obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = NetAddress_write(obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_Result_read(int8_tArray ser) {
@@ -10494,20 +13270,6 @@ void  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_free(ui
        UnsignedNodeAnnouncement_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_clone(uint32_t orig) {
-       LDKUnsignedNodeAnnouncement orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_get_features(uint32_t this_ptr) {
        LDKUnsignedNodeAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10529,7 +13291,7 @@ void  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_set_fea
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        UnsignedNodeAnnouncement_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -10552,9 +13314,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_
        LDKUnsignedNodeAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), UnsignedNodeAnnouncement_get_node_id(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), UnsignedNodeAnnouncement_get_node_id(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_set_node_id(uint32_t this_ptr, int8_tArray val) {
@@ -10617,26 +13379,19 @@ void  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_set_add
                val_constr.data = NULL;
        uint32_t* val_vals = (uint32_t*)(val + 4);
        for (size_t m = 0; m < val_constr.datalen; m++) {
-               uint32_t arr_conv_12 = val_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               val_constr.data[m] = arr_conv_12_conv;
+               uint32_t val_conv_12 = val_vals[m];
+               LDKNetAddress val_conv_12_conv = *(LDKNetAddress*)(((uint64_t)val_conv_12) & ~1);
+               FREE((void*)val_conv_12);
+               val_constr.data[m] = val_conv_12_conv;
        }
        UnsignedNodeAnnouncement_set_addresses(&this_ptr_conv, val_constr);
 }
 
-void  __attribute__((visibility("default"))) TS_NodeAnnouncement_free(uint32_t this_ptr) {
-       LDKNodeAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       NodeAnnouncement_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncement_clone(uint32_t orig) {
-       LDKNodeAnnouncement orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_clone(uint32_t orig) {
+       LDKUnsignedNodeAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKNodeAnnouncement ret_var = NodeAnnouncement_clone(&orig_conv);
+       LDKUnsignedNodeAnnouncement ret_var = UnsignedNodeAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10646,13 +13401,20 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncement_clone(uint3
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_NodeAnnouncement_free(uint32_t this_ptr) {
+       LDKNodeAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       NodeAnnouncement_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_NodeAnnouncement_get_signature(uint32_t this_ptr) {
        LDKNodeAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), NodeAnnouncement_get_signature(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), NodeAnnouncement_get_signature(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_NodeAnnouncement_set_signature(uint32_t this_ptr, int8_tArray val) {
@@ -10708,18 +13470,11 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncement_new(int8_tA
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_free(uint32_t this_ptr) {
-       LDKUnsignedChannelAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UnsignedChannelAnnouncement_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_clone(uint32_t orig) {
-       LDKUnsignedChannelAnnouncement orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncement_clone(uint32_t orig) {
+       LDKNodeAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUnsignedChannelAnnouncement ret_var = UnsignedChannelAnnouncement_clone(&orig_conv);
+       LDKNodeAnnouncement ret_var = NodeAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10729,6 +13484,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_free(uint32_t this_ptr) {
+       LDKUnsignedChannelAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UnsignedChannelAnnouncement_free(this_ptr_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_get_features(uint32_t this_ptr) {
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -10750,7 +13512,7 @@ void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_set_
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        UnsignedChannelAnnouncement_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -10792,9 +13554,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_UnsignedChannelAnnounceme
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), UnsignedChannelAnnouncement_get_node_id_1(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), UnsignedChannelAnnouncement_get_node_id_1(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_set_node_id_1(uint32_t this_ptr, int8_tArray val) {
@@ -10811,9 +13573,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_UnsignedChannelAnnounceme
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), UnsignedChannelAnnouncement_get_node_id_2(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), UnsignedChannelAnnouncement_get_node_id_2(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_set_node_id_2(uint32_t this_ptr, int8_tArray val) {
@@ -10830,9 +13592,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_UnsignedChannelAnnounceme
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), UnsignedChannelAnnouncement_get_bitcoin_key_1(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), UnsignedChannelAnnouncement_get_bitcoin_key_1(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_set_bitcoin_key_1(uint32_t this_ptr, int8_tArray val) {
@@ -10849,9 +13611,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_UnsignedChannelAnnounceme
        LDKUnsignedChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), UnsignedChannelAnnouncement_get_bitcoin_key_2(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), UnsignedChannelAnnouncement_get_bitcoin_key_2(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_set_bitcoin_key_2(uint32_t this_ptr, int8_tArray val) {
@@ -10864,18 +13626,11 @@ void  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_set_
        UnsignedChannelAnnouncement_set_bitcoin_key_2(&this_ptr_conv, val_ref);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelAnnouncement_free(uint32_t this_ptr) {
-       LDKChannelAnnouncement this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelAnnouncement_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelAnnouncement_clone(uint32_t orig) {
-       LDKChannelAnnouncement orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_clone(uint32_t orig) {
+       LDKUnsignedChannelAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelAnnouncement ret_var = ChannelAnnouncement_clone(&orig_conv);
+       LDKUnsignedChannelAnnouncement ret_var = UnsignedChannelAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -10885,13 +13640,20 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelAnnouncement_clone(ui
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelAnnouncement_free(uint32_t this_ptr) {
+       LDKChannelAnnouncement this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelAnnouncement_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelAnnouncement_get_node_signature_1(uint32_t this_ptr) {
        LDKChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelAnnouncement_get_node_signature_1(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelAnnouncement_get_node_signature_1(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelAnnouncement_set_node_signature_1(uint32_t this_ptr, int8_tArray val) {
@@ -10908,9 +13670,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelAnnouncement_get_n
        LDKChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelAnnouncement_get_node_signature_2(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelAnnouncement_get_node_signature_2(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelAnnouncement_set_node_signature_2(uint32_t this_ptr, int8_tArray val) {
@@ -10927,9 +13689,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelAnnouncement_get_b
        LDKChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelAnnouncement_get_bitcoin_signature_1(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelAnnouncement_get_bitcoin_signature_1(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelAnnouncement_set_bitcoin_signature_1(uint32_t this_ptr, int8_tArray val) {
@@ -10946,9 +13708,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelAnnouncement_get_b
        LDKChannelAnnouncement this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelAnnouncement_get_bitcoin_signature_2(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelAnnouncement_get_bitcoin_signature_2(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelAnnouncement_set_bitcoin_signature_2(uint32_t this_ptr, int8_tArray val) {
@@ -11013,18 +13775,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelAnnouncement_new(int8
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_free(uint32_t this_ptr) {
-       LDKUnsignedChannelUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       UnsignedChannelUpdate_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_clone(uint32_t orig) {
-       LDKUnsignedChannelUpdate orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ChannelAnnouncement_clone(uint32_t orig) {
+       LDKChannelAnnouncement orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKUnsignedChannelUpdate ret_var = UnsignedChannelUpdate_clone(&orig_conv);
+       LDKChannelAnnouncement ret_var = ChannelAnnouncement_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11034,6 +13789,13 @@ uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_clone(
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_free(uint32_t this_ptr) {
+       LDKUnsignedChannelUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       UnsignedChannelUpdate_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_get_chain_hash(uint32_t this_ptr) {
        LDKUnsignedChannelUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11158,18 +13920,11 @@ void  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_set_fee_pr
        UnsignedChannelUpdate_set_fee_proportional_millionths(&this_ptr_conv, val);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelUpdate_free(uint32_t this_ptr) {
-       LDKChannelUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelUpdate_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ChannelUpdate_clone(uint32_t orig) {
-       LDKChannelUpdate orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_clone(uint32_t orig) {
+       LDKUnsignedChannelUpdate orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKChannelUpdate ret_var = ChannelUpdate_clone(&orig_conv);
+       LDKUnsignedChannelUpdate ret_var = UnsignedChannelUpdate_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11179,13 +13934,20 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelUpdate_clone(uint32_t
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ChannelUpdate_free(uint32_t this_ptr) {
+       LDKChannelUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelUpdate_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelUpdate_get_signature(uint32_t this_ptr) {
        LDKChannelUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelUpdate_get_signature(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelUpdate_get_signature(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelUpdate_set_signature(uint32_t this_ptr, int8_tArray val) {
@@ -11241,18 +14003,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelUpdate_new(int8_tArra
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_QueryChannelRange_free(uint32_t this_ptr) {
-       LDKQueryChannelRange this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       QueryChannelRange_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_QueryChannelRange_clone(uint32_t orig) {
-       LDKQueryChannelRange orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ChannelUpdate_clone(uint32_t orig) {
+       LDKChannelUpdate orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKQueryChannelRange ret_var = QueryChannelRange_clone(&orig_conv);
+       LDKChannelUpdate ret_var = ChannelUpdate_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11262,6 +14017,13 @@ uint32_t  __attribute__((visibility("default"))) TS_QueryChannelRange_clone(uint
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_QueryChannelRange_free(uint32_t this_ptr) {
+       LDKQueryChannelRange this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       QueryChannelRange_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_QueryChannelRange_get_chain_hash(uint32_t this_ptr) {
        LDKQueryChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11325,18 +14087,11 @@ uint32_t  __attribute__((visibility("default"))) TS_QueryChannelRange_new(int8_t
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ReplyChannelRange_free(uint32_t this_ptr) {
-       LDKReplyChannelRange this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ReplyChannelRange_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_clone(uint32_t orig) {
-       LDKReplyChannelRange orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_QueryChannelRange_clone(uint32_t orig) {
+       LDKQueryChannelRange orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKReplyChannelRange ret_var = ReplyChannelRange_clone(&orig_conv);
+       LDKQueryChannelRange ret_var = QueryChannelRange_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11346,6 +14101,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_clone(uint
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ReplyChannelRange_free(uint32_t this_ptr) {
+       LDKReplyChannelRange this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ReplyChannelRange_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ReplyChannelRange_get_chain_hash(uint32_t this_ptr) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11395,19 +14157,19 @@ void  __attribute__((visibility("default"))) TS_ReplyChannelRange_set_number_of_
        ReplyChannelRange_set_number_of_blocks(&this_ptr_conv, val);
 }
 
-jboolean  __attribute__((visibility("default"))) TS_ReplyChannelRange_get_full_information(uint32_t this_ptr) {
+jboolean  __attribute__((visibility("default"))) TS_ReplyChannelRange_get_sync_complete(uint32_t this_ptr) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       jboolean ret_val = ReplyChannelRange_get_full_information(&this_ptr_conv);
+       jboolean ret_val = ReplyChannelRange_get_sync_complete(&this_ptr_conv);
        return ret_val;
 }
 
-void  __attribute__((visibility("default"))) TS_ReplyChannelRange_set_full_information(uint32_t this_ptr, jboolean val) {
+void  __attribute__((visibility("default"))) TS_ReplyChannelRange_set_sync_complete(uint32_t this_ptr, jboolean val) {
        LDKReplyChannelRange this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       ReplyChannelRange_set_full_information(&this_ptr_conv, val);
+       ReplyChannelRange_set_sync_complete(&this_ptr_conv, val);
 }
 
 void  __attribute__((visibility("default"))) TS_ReplyChannelRange_set_short_channel_ids(uint32_t this_ptr, int64_tArray val) {
@@ -11422,13 +14184,13 @@ void  __attribute__((visibility("default"))) TS_ReplyChannelRange_set_short_chan
                val_constr.data = NULL;
        int64_t* val_vals = (int64_t*)(val + 4);
        for (size_t i = 0; i < val_constr.datalen; i++) {
-               int64_t arr_conv_8 = val_vals[i];
-               val_constr.data[i] = arr_conv_8;
+               int64_t val_conv_8 = val_vals[i];
+               val_constr.data[i] = val_conv_8;
        }
        ReplyChannelRange_set_short_channel_ids(&this_ptr_conv, val_constr);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_new(int8_tArray chain_hash_arg, int32_t first_blocknum_arg, int32_t number_of_blocks_arg, jboolean full_information_arg, int64_tArray short_channel_ids_arg) {
+uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_new(int8_tArray chain_hash_arg, int32_t first_blocknum_arg, int32_t number_of_blocks_arg, jboolean sync_complete_arg, int64_tArray short_channel_ids_arg) {
        LDKThirtyTwoBytes chain_hash_arg_ref;
        CHECK(*((uint32_t*)chain_hash_arg) == 32);
        memcpy(chain_hash_arg_ref.data, (uint8_t*)(chain_hash_arg + 4), 32);
@@ -11440,10 +14202,10 @@ uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_new(int8_t
                short_channel_ids_arg_constr.data = NULL;
        int64_t* short_channel_ids_arg_vals = (int64_t*)(short_channel_ids_arg + 4);
        for (size_t i = 0; i < short_channel_ids_arg_constr.datalen; i++) {
-               int64_t arr_conv_8 = short_channel_ids_arg_vals[i];
-               short_channel_ids_arg_constr.data[i] = arr_conv_8;
+               int64_t short_channel_ids_arg_conv_8 = short_channel_ids_arg_vals[i];
+               short_channel_ids_arg_constr.data[i] = short_channel_ids_arg_conv_8;
        }
-       LDKReplyChannelRange ret_var = ReplyChannelRange_new(chain_hash_arg_ref, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg_constr);
+       LDKReplyChannelRange ret_var = ReplyChannelRange_new(chain_hash_arg_ref, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg_constr);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11453,18 +14215,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_new(int8_t
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_QueryShortChannelIds_free(uint32_t this_ptr) {
-       LDKQueryShortChannelIds this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       QueryShortChannelIds_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_clone(uint32_t orig) {
-       LDKQueryShortChannelIds orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_clone(uint32_t orig) {
+       LDKReplyChannelRange orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKQueryShortChannelIds ret_var = QueryShortChannelIds_clone(&orig_conv);
+       LDKReplyChannelRange ret_var = ReplyChannelRange_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11474,6 +14229,13 @@ uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_clone(u
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_QueryShortChannelIds_free(uint32_t this_ptr) {
+       LDKQueryShortChannelIds this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       QueryShortChannelIds_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_QueryShortChannelIds_get_chain_hash(uint32_t this_ptr) {
        LDKQueryShortChannelIds this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11505,8 +14267,8 @@ void  __attribute__((visibility("default"))) TS_QueryShortChannelIds_set_short_c
                val_constr.data = NULL;
        int64_t* val_vals = (int64_t*)(val + 4);
        for (size_t i = 0; i < val_constr.datalen; i++) {
-               int64_t arr_conv_8 = val_vals[i];
-               val_constr.data[i] = arr_conv_8;
+               int64_t val_conv_8 = val_vals[i];
+               val_constr.data[i] = val_conv_8;
        }
        QueryShortChannelIds_set_short_channel_ids(&this_ptr_conv, val_constr);
 }
@@ -11523,8 +14285,8 @@ uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_new(int
                short_channel_ids_arg_constr.data = NULL;
        int64_t* short_channel_ids_arg_vals = (int64_t*)(short_channel_ids_arg + 4);
        for (size_t i = 0; i < short_channel_ids_arg_constr.datalen; i++) {
-               int64_t arr_conv_8 = short_channel_ids_arg_vals[i];
-               short_channel_ids_arg_constr.data[i] = arr_conv_8;
+               int64_t short_channel_ids_arg_conv_8 = short_channel_ids_arg_vals[i];
+               short_channel_ids_arg_constr.data[i] = short_channel_ids_arg_conv_8;
        }
        LDKQueryShortChannelIds ret_var = QueryShortChannelIds_new(chain_hash_arg_ref, short_channel_ids_arg_constr);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -11536,18 +14298,11 @@ uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_new(int
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_free(uint32_t this_ptr) {
-       LDKReplyShortChannelIdsEnd this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ReplyShortChannelIdsEnd_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_clone(uint32_t orig) {
-       LDKReplyShortChannelIdsEnd orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_clone(uint32_t orig) {
+       LDKQueryShortChannelIds orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKReplyShortChannelIdsEnd ret_var = ReplyShortChannelIdsEnd_clone(&orig_conv);
+       LDKQueryShortChannelIds ret_var = QueryShortChannelIds_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11557,6 +14312,13 @@ uint32_t  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_clon
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_free(uint32_t this_ptr) {
+       LDKReplyShortChannelIdsEnd this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ReplyShortChannelIdsEnd_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_get_chain_hash(uint32_t this_ptr) {
        LDKReplyShortChannelIdsEnd this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11605,18 +14367,11 @@ uint32_t  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_new(
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_GossipTimestampFilter_free(uint32_t this_ptr) {
-       LDKGossipTimestampFilter this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       GossipTimestampFilter_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_GossipTimestampFilter_clone(uint32_t orig) {
-       LDKGossipTimestampFilter orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_clone(uint32_t orig) {
+       LDKReplyShortChannelIdsEnd orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKGossipTimestampFilter ret_var = GossipTimestampFilter_clone(&orig_conv);
+       LDKReplyShortChannelIdsEnd ret_var = ReplyShortChannelIdsEnd_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11626,6 +14381,13 @@ uint32_t  __attribute__((visibility("default"))) TS_GossipTimestampFilter_clone(
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_GossipTimestampFilter_free(uint32_t this_ptr) {
+       LDKGossipTimestampFilter this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       GossipTimestampFilter_free(this_ptr_conv);
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_GossipTimestampFilter_get_chain_hash(uint32_t this_ptr) {
        LDKGossipTimestampFilter this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11689,6 +14451,20 @@ uint32_t  __attribute__((visibility("default"))) TS_GossipTimestampFilter_new(in
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_GossipTimestampFilter_clone(uint32_t orig) {
+       LDKGossipTimestampFilter orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKGossipTimestampFilter ret_var = GossipTimestampFilter_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_ErrorAction_free(uint32_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKErrorAction this_ptr_conv = *(LDKErrorAction*)(((uint64_t)this_ptr) & ~1);
@@ -11711,20 +14487,6 @@ void  __attribute__((visibility("default"))) TS_LightningError_free(uint32_t thi
        LightningError_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_LightningError_clone(uint32_t orig) {
-       LDKLightningError orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKLightningError ret_var = LightningError_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 jstring  __attribute__((visibility("default"))) TS_LightningError_get_err(uint32_t this_ptr) {
        LDKLightningError this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11781,18 +14543,11 @@ uint32_t  __attribute__((visibility("default"))) TS_LightningError_new(int8_tArr
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_CommitmentUpdate_free(uint32_t this_ptr) {
-       LDKCommitmentUpdate this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       CommitmentUpdate_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_clone(uint32_t orig) {
-       LDKCommitmentUpdate orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_LightningError_clone(uint32_t orig) {
+       LDKLightningError orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKCommitmentUpdate ret_var = CommitmentUpdate_clone(&orig_conv);
+       LDKLightningError ret_var = LightningError_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -11802,6 +14557,13 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_clone(uint3
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_CommitmentUpdate_free(uint32_t this_ptr) {
+       LDKCommitmentUpdate this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       CommitmentUpdate_free(this_ptr_conv);
+}
+
 void  __attribute__((visibility("default"))) TS_CommitmentUpdate_set_update_add_htlcs(uint32_t this_ptr, uint32_tArray val) {
        LDKCommitmentUpdate this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -11814,12 +14576,12 @@ void  __attribute__((visibility("default"))) TS_CommitmentUpdate_set_update_add_
                val_constr.data = NULL;
        uint32_t* val_vals = (uint32_t*)(val + 4);
        for (size_t p = 0; p < val_constr.datalen; p++) {
-               uint32_t arr_conv_15 = val_vals[p];
-               LDKUpdateAddHTLC arr_conv_15_conv;
-               arr_conv_15_conv.inner = (void*)(arr_conv_15 & (~1));
-               arr_conv_15_conv.is_owned = (arr_conv_15 & 1) || (arr_conv_15 == 0);
-               arr_conv_15_conv = UpdateAddHTLC_clone(&arr_conv_15_conv);
-               val_constr.data[p] = arr_conv_15_conv;
+               uint32_t val_conv_15 = val_vals[p];
+               LDKUpdateAddHTLC val_conv_15_conv;
+               val_conv_15_conv.inner = (void*)(val_conv_15 & (~1));
+               val_conv_15_conv.is_owned = (val_conv_15 & 1) || (val_conv_15 == 0);
+               val_conv_15_conv = UpdateAddHTLC_clone(&val_conv_15_conv);
+               val_constr.data[p] = val_conv_15_conv;
        }
        CommitmentUpdate_set_update_add_htlcs(&this_ptr_conv, val_constr);
 }
@@ -11836,12 +14598,12 @@ void  __attribute__((visibility("default"))) TS_CommitmentUpdate_set_update_fulf
                val_constr.data = NULL;
        uint32_t* val_vals = (uint32_t*)(val + 4);
        for (size_t t = 0; t < val_constr.datalen; t++) {
-               uint32_t arr_conv_19 = val_vals[t];
-               LDKUpdateFulfillHTLC arr_conv_19_conv;
-               arr_conv_19_conv.inner = (void*)(arr_conv_19 & (~1));
-               arr_conv_19_conv.is_owned = (arr_conv_19 & 1) || (arr_conv_19 == 0);
-               arr_conv_19_conv = UpdateFulfillHTLC_clone(&arr_conv_19_conv);
-               val_constr.data[t] = arr_conv_19_conv;
+               uint32_t val_conv_19 = val_vals[t];
+               LDKUpdateFulfillHTLC val_conv_19_conv;
+               val_conv_19_conv.inner = (void*)(val_conv_19 & (~1));
+               val_conv_19_conv.is_owned = (val_conv_19 & 1) || (val_conv_19 == 0);
+               val_conv_19_conv = UpdateFulfillHTLC_clone(&val_conv_19_conv);
+               val_constr.data[t] = val_conv_19_conv;
        }
        CommitmentUpdate_set_update_fulfill_htlcs(&this_ptr_conv, val_constr);
 }
@@ -11858,12 +14620,12 @@ void  __attribute__((visibility("default"))) TS_CommitmentUpdate_set_update_fail
                val_constr.data = NULL;
        uint32_t* val_vals = (uint32_t*)(val + 4);
        for (size_t q = 0; q < val_constr.datalen; q++) {
-               uint32_t arr_conv_16 = val_vals[q];
-               LDKUpdateFailHTLC arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               arr_conv_16_conv = UpdateFailHTLC_clone(&arr_conv_16_conv);
-               val_constr.data[q] = arr_conv_16_conv;
+               uint32_t val_conv_16 = val_vals[q];
+               LDKUpdateFailHTLC val_conv_16_conv;
+               val_conv_16_conv.inner = (void*)(val_conv_16 & (~1));
+               val_conv_16_conv.is_owned = (val_conv_16 & 1) || (val_conv_16 == 0);
+               val_conv_16_conv = UpdateFailHTLC_clone(&val_conv_16_conv);
+               val_constr.data[q] = val_conv_16_conv;
        }
        CommitmentUpdate_set_update_fail_htlcs(&this_ptr_conv, val_constr);
 }
@@ -11880,12 +14642,12 @@ void  __attribute__((visibility("default"))) TS_CommitmentUpdate_set_update_fail
                val_constr.data = NULL;
        uint32_t* val_vals = (uint32_t*)(val + 4);
        for (size_t z = 0; z < val_constr.datalen; z++) {
-               uint32_t arr_conv_25 = val_vals[z];
-               LDKUpdateFailMalformedHTLC arr_conv_25_conv;
-               arr_conv_25_conv.inner = (void*)(arr_conv_25 & (~1));
-               arr_conv_25_conv.is_owned = (arr_conv_25 & 1) || (arr_conv_25 == 0);
-               arr_conv_25_conv = UpdateFailMalformedHTLC_clone(&arr_conv_25_conv);
-               val_constr.data[z] = arr_conv_25_conv;
+               uint32_t val_conv_25 = val_vals[z];
+               LDKUpdateFailMalformedHTLC val_conv_25_conv;
+               val_conv_25_conv.inner = (void*)(val_conv_25 & (~1));
+               val_conv_25_conv.is_owned = (val_conv_25 & 1) || (val_conv_25 == 0);
+               val_conv_25_conv = UpdateFailMalformedHTLC_clone(&val_conv_25_conv);
+               val_constr.data[z] = val_conv_25_conv;
        }
        CommitmentUpdate_set_update_fail_malformed_htlcs(&this_ptr_conv, val_constr);
 }
@@ -11949,12 +14711,12 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_new(uint32_
                update_add_htlcs_arg_constr.data = NULL;
        uint32_t* update_add_htlcs_arg_vals = (uint32_t*)(update_add_htlcs_arg + 4);
        for (size_t p = 0; p < update_add_htlcs_arg_constr.datalen; p++) {
-               uint32_t arr_conv_15 = update_add_htlcs_arg_vals[p];
-               LDKUpdateAddHTLC arr_conv_15_conv;
-               arr_conv_15_conv.inner = (void*)(arr_conv_15 & (~1));
-               arr_conv_15_conv.is_owned = (arr_conv_15 & 1) || (arr_conv_15 == 0);
-               arr_conv_15_conv = UpdateAddHTLC_clone(&arr_conv_15_conv);
-               update_add_htlcs_arg_constr.data[p] = arr_conv_15_conv;
+               uint32_t update_add_htlcs_arg_conv_15 = update_add_htlcs_arg_vals[p];
+               LDKUpdateAddHTLC update_add_htlcs_arg_conv_15_conv;
+               update_add_htlcs_arg_conv_15_conv.inner = (void*)(update_add_htlcs_arg_conv_15 & (~1));
+               update_add_htlcs_arg_conv_15_conv.is_owned = (update_add_htlcs_arg_conv_15 & 1) || (update_add_htlcs_arg_conv_15 == 0);
+               update_add_htlcs_arg_conv_15_conv = UpdateAddHTLC_clone(&update_add_htlcs_arg_conv_15_conv);
+               update_add_htlcs_arg_constr.data[p] = update_add_htlcs_arg_conv_15_conv;
        }
        LDKCVec_UpdateFulfillHTLCZ update_fulfill_htlcs_arg_constr;
        update_fulfill_htlcs_arg_constr.datalen = *((uint32_t*)update_fulfill_htlcs_arg);
@@ -11964,12 +14726,12 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_new(uint32_
                update_fulfill_htlcs_arg_constr.data = NULL;
        uint32_t* update_fulfill_htlcs_arg_vals = (uint32_t*)(update_fulfill_htlcs_arg + 4);
        for (size_t t = 0; t < update_fulfill_htlcs_arg_constr.datalen; t++) {
-               uint32_t arr_conv_19 = update_fulfill_htlcs_arg_vals[t];
-               LDKUpdateFulfillHTLC arr_conv_19_conv;
-               arr_conv_19_conv.inner = (void*)(arr_conv_19 & (~1));
-               arr_conv_19_conv.is_owned = (arr_conv_19 & 1) || (arr_conv_19 == 0);
-               arr_conv_19_conv = UpdateFulfillHTLC_clone(&arr_conv_19_conv);
-               update_fulfill_htlcs_arg_constr.data[t] = arr_conv_19_conv;
+               uint32_t update_fulfill_htlcs_arg_conv_19 = update_fulfill_htlcs_arg_vals[t];
+               LDKUpdateFulfillHTLC update_fulfill_htlcs_arg_conv_19_conv;
+               update_fulfill_htlcs_arg_conv_19_conv.inner = (void*)(update_fulfill_htlcs_arg_conv_19 & (~1));
+               update_fulfill_htlcs_arg_conv_19_conv.is_owned = (update_fulfill_htlcs_arg_conv_19 & 1) || (update_fulfill_htlcs_arg_conv_19 == 0);
+               update_fulfill_htlcs_arg_conv_19_conv = UpdateFulfillHTLC_clone(&update_fulfill_htlcs_arg_conv_19_conv);
+               update_fulfill_htlcs_arg_constr.data[t] = update_fulfill_htlcs_arg_conv_19_conv;
        }
        LDKCVec_UpdateFailHTLCZ update_fail_htlcs_arg_constr;
        update_fail_htlcs_arg_constr.datalen = *((uint32_t*)update_fail_htlcs_arg);
@@ -11979,12 +14741,12 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_new(uint32_
                update_fail_htlcs_arg_constr.data = NULL;
        uint32_t* update_fail_htlcs_arg_vals = (uint32_t*)(update_fail_htlcs_arg + 4);
        for (size_t q = 0; q < update_fail_htlcs_arg_constr.datalen; q++) {
-               uint32_t arr_conv_16 = update_fail_htlcs_arg_vals[q];
-               LDKUpdateFailHTLC arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               arr_conv_16_conv = UpdateFailHTLC_clone(&arr_conv_16_conv);
-               update_fail_htlcs_arg_constr.data[q] = arr_conv_16_conv;
+               uint32_t update_fail_htlcs_arg_conv_16 = update_fail_htlcs_arg_vals[q];
+               LDKUpdateFailHTLC update_fail_htlcs_arg_conv_16_conv;
+               update_fail_htlcs_arg_conv_16_conv.inner = (void*)(update_fail_htlcs_arg_conv_16 & (~1));
+               update_fail_htlcs_arg_conv_16_conv.is_owned = (update_fail_htlcs_arg_conv_16 & 1) || (update_fail_htlcs_arg_conv_16 == 0);
+               update_fail_htlcs_arg_conv_16_conv = UpdateFailHTLC_clone(&update_fail_htlcs_arg_conv_16_conv);
+               update_fail_htlcs_arg_constr.data[q] = update_fail_htlcs_arg_conv_16_conv;
        }
        LDKCVec_UpdateFailMalformedHTLCZ update_fail_malformed_htlcs_arg_constr;
        update_fail_malformed_htlcs_arg_constr.datalen = *((uint32_t*)update_fail_malformed_htlcs_arg);
@@ -11994,12 +14756,12 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_new(uint32_
                update_fail_malformed_htlcs_arg_constr.data = NULL;
        uint32_t* update_fail_malformed_htlcs_arg_vals = (uint32_t*)(update_fail_malformed_htlcs_arg + 4);
        for (size_t z = 0; z < update_fail_malformed_htlcs_arg_constr.datalen; z++) {
-               uint32_t arr_conv_25 = update_fail_malformed_htlcs_arg_vals[z];
-               LDKUpdateFailMalformedHTLC arr_conv_25_conv;
-               arr_conv_25_conv.inner = (void*)(arr_conv_25 & (~1));
-               arr_conv_25_conv.is_owned = (arr_conv_25 & 1) || (arr_conv_25 == 0);
-               arr_conv_25_conv = UpdateFailMalformedHTLC_clone(&arr_conv_25_conv);
-               update_fail_malformed_htlcs_arg_constr.data[z] = arr_conv_25_conv;
+               uint32_t update_fail_malformed_htlcs_arg_conv_25 = update_fail_malformed_htlcs_arg_vals[z];
+               LDKUpdateFailMalformedHTLC update_fail_malformed_htlcs_arg_conv_25_conv;
+               update_fail_malformed_htlcs_arg_conv_25_conv.inner = (void*)(update_fail_malformed_htlcs_arg_conv_25 & (~1));
+               update_fail_malformed_htlcs_arg_conv_25_conv.is_owned = (update_fail_malformed_htlcs_arg_conv_25 & 1) || (update_fail_malformed_htlcs_arg_conv_25 == 0);
+               update_fail_malformed_htlcs_arg_conv_25_conv = UpdateFailMalformedHTLC_clone(&update_fail_malformed_htlcs_arg_conv_25_conv);
+               update_fail_malformed_htlcs_arg_constr.data[z] = update_fail_malformed_htlcs_arg_conv_25_conv;
        }
        LDKUpdateFee update_fee_arg_conv;
        update_fee_arg_conv.inner = (void*)(update_fee_arg & (~1));
@@ -12019,6 +14781,20 @@ uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_new(uint32_
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CommitmentUpdate_clone(uint32_t orig) {
+       LDKCommitmentUpdate orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKCommitmentUpdate ret_var = CommitmentUpdate_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_HTLCFailChannelUpdate_free(uint32_t this_ptr) {
        if ((this_ptr & 1) != 0) return;
        LDKHTLCFailChannelUpdate this_ptr_conv = *(LDKHTLCFailChannelUpdate*)(((uint64_t)this_ptr) & ~1);
@@ -12052,61 +14828,51 @@ int8_tArray  __attribute__((visibility("default"))) TS_AcceptChannel_write(uint3
        LDKAcceptChannel obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = AcceptChannel_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = AcceptChannel_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_AcceptChannel_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKAcceptChannel ret_var = AcceptChannel_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_AcceptChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AcceptChannelDecodeErrorZ), "LDKCResult_AcceptChannelDecodeErrorZ");
+       *ret_conv = AcceptChannel_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_AnnouncementSignatures_write(uint32_t obj) {
        LDKAnnouncementSignatures obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = AnnouncementSignatures_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = AnnouncementSignatures_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_AnnouncementSignatures_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKAnnouncementSignatures ret_var = AnnouncementSignatures_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_AnnouncementSignaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_AnnouncementSignaturesDecodeErrorZ), "LDKCResult_AnnouncementSignaturesDecodeErrorZ");
+       *ret_conv = AnnouncementSignatures_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelReestablish_write(uint32_t obj) {
        LDKChannelReestablish obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelReestablish_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelReestablish_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelReestablish_read(int8_tArray ser) {
@@ -12122,136 +14888,111 @@ int8_tArray  __attribute__((visibility("default"))) TS_ClosingSigned_write(uint3
        LDKClosingSigned obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ClosingSigned_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ClosingSigned_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ClosingSigned_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKClosingSigned ret_var = ClosingSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ClosingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ClosingSignedDecodeErrorZ), "LDKCResult_ClosingSignedDecodeErrorZ");
+       *ret_conv = ClosingSigned_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_CommitmentSigned_write(uint32_t obj) {
        LDKCommitmentSigned obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = CommitmentSigned_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = CommitmentSigned_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_CommitmentSigned_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKCommitmentSigned ret_var = CommitmentSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_CommitmentSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentSignedDecodeErrorZ), "LDKCResult_CommitmentSignedDecodeErrorZ");
+       *ret_conv = CommitmentSigned_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_FundingCreated_write(uint32_t obj) {
        LDKFundingCreated obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = FundingCreated_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = FundingCreated_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_FundingCreated_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKFundingCreated ret_var = FundingCreated_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_FundingCreatedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingCreatedDecodeErrorZ), "LDKCResult_FundingCreatedDecodeErrorZ");
+       *ret_conv = FundingCreated_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_FundingSigned_write(uint32_t obj) {
        LDKFundingSigned obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = FundingSigned_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = FundingSigned_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_FundingSigned_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKFundingSigned ret_var = FundingSigned_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_FundingSignedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingSignedDecodeErrorZ), "LDKCResult_FundingSignedDecodeErrorZ");
+       *ret_conv = FundingSigned_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_FundingLocked_write(uint32_t obj) {
        LDKFundingLocked obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = FundingLocked_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = FundingLocked_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_FundingLocked_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKFundingLocked ret_var = FundingLocked_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_FundingLockedDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_FundingLockedDecodeErrorZ), "LDKCResult_FundingLockedDecodeErrorZ");
+       *ret_conv = FundingLocked_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_Init_write(uint32_t obj) {
        LDKInit obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Init_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Init_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_Init_read(int8_tArray ser) {
@@ -12267,211 +15008,171 @@ int8_tArray  __attribute__((visibility("default"))) TS_OpenChannel_write(uint32_
        LDKOpenChannel obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = OpenChannel_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = OpenChannel_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_OpenChannel_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKOpenChannel ret_var = OpenChannel_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_OpenChannelDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_OpenChannelDecodeErrorZ), "LDKCResult_OpenChannelDecodeErrorZ");
+       *ret_conv = OpenChannel_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_RevokeAndACK_write(uint32_t obj) {
        LDKRevokeAndACK obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = RevokeAndACK_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = RevokeAndACK_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_RevokeAndACK_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKRevokeAndACK ret_var = RevokeAndACK_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_RevokeAndACKDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RevokeAndACKDecodeErrorZ), "LDKCResult_RevokeAndACKDecodeErrorZ");
+       *ret_conv = RevokeAndACK_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_Shutdown_write(uint32_t obj) {
        LDKShutdown obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Shutdown_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Shutdown_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_Shutdown_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKShutdown ret_var = Shutdown_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ShutdownDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ShutdownDecodeErrorZ), "LDKCResult_ShutdownDecodeErrorZ");
+       *ret_conv = Shutdown_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFailHTLC_write(uint32_t obj) {
        LDKUpdateFailHTLC obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UpdateFailHTLC_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UpdateFailHTLC_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_UpdateFailHTLC_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKUpdateFailHTLC ret_var = UpdateFailHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_UpdateFailHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailHTLCDecodeErrorZ), "LDKCResult_UpdateFailHTLCDecodeErrorZ");
+       *ret_conv = UpdateFailHTLC_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_write(uint32_t obj) {
        LDKUpdateFailMalformedHTLC obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UpdateFailMalformedHTLC_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UpdateFailMalformedHTLC_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_UpdateFailMalformedHTLC_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKUpdateFailMalformedHTLC ret_var = UpdateFailMalformedHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ), "LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ");
+       *ret_conv = UpdateFailMalformedHTLC_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFee_write(uint32_t obj) {
        LDKUpdateFee obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UpdateFee_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UpdateFee_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_UpdateFee_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKUpdateFee ret_var = UpdateFee_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_UpdateFeeDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFeeDecodeErrorZ), "LDKCResult_UpdateFeeDecodeErrorZ");
+       *ret_conv = UpdateFee_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_write(uint32_t obj) {
        LDKUpdateFulfillHTLC obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UpdateFulfillHTLC_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UpdateFulfillHTLC_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_UpdateFulfillHTLC_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKUpdateFulfillHTLC ret_var = UpdateFulfillHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_UpdateFulfillHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateFulfillHTLCDecodeErrorZ), "LDKCResult_UpdateFulfillHTLCDecodeErrorZ");
+       *ret_conv = UpdateFulfillHTLC_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UpdateAddHTLC_write(uint32_t obj) {
        LDKUpdateAddHTLC obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UpdateAddHTLC_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UpdateAddHTLC_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_UpdateAddHTLC_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKUpdateAddHTLC ret_var = UpdateAddHTLC_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_UpdateAddHTLCDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_UpdateAddHTLCDecodeErrorZ), "LDKCResult_UpdateAddHTLCDecodeErrorZ");
+       *ret_conv = UpdateAddHTLC_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_Ping_write(uint32_t obj) {
        LDKPing obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Ping_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Ping_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_Ping_read(int8_tArray ser) {
@@ -12487,11 +15188,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_Pong_write(uint32_t obj)
        LDKPong obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Pong_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Pong_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_Pong_read(int8_tArray ser) {
@@ -12507,11 +15208,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_UnsignedChannelAnnounceme
        LDKUnsignedChannelAnnouncement obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UnsignedChannelAnnouncement_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UnsignedChannelAnnouncement_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelAnnouncement_read(int8_tArray ser) {
@@ -12527,36 +15228,31 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelAnnouncement_write
        LDKChannelAnnouncement obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelAnnouncement_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelAnnouncement_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelAnnouncement_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelAnnouncement ret_var = ChannelAnnouncement_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelAnnouncementDecodeErrorZ), "LDKCResult_ChannelAnnouncementDecodeErrorZ");
+       *ret_conv = ChannelAnnouncement_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_write(uint32_t obj) {
        LDKUnsignedChannelUpdate obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UnsignedChannelUpdate_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UnsignedChannelUpdate_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_UnsignedChannelUpdate_read(int8_tArray ser) {
@@ -12572,36 +15268,31 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelUpdate_write(uint3
        LDKChannelUpdate obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelUpdate_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelUpdate_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelUpdate_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelUpdate ret_var = ChannelUpdate_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelUpdateDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelUpdateDecodeErrorZ), "LDKCResult_ChannelUpdateDecodeErrorZ");
+       *ret_conv = ChannelUpdate_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_ErrorMessage_write(uint32_t obj) {
        LDKErrorMessage obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ErrorMessage_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ErrorMessage_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ErrorMessage_read(int8_tArray ser) {
@@ -12617,11 +15308,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_
        LDKUnsignedNodeAnnouncement obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = UnsignedNodeAnnouncement_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = UnsignedNodeAnnouncement_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_UnsignedNodeAnnouncement_read(int8_tArray ser) {
@@ -12637,25 +15328,20 @@ int8_tArray  __attribute__((visibility("default"))) TS_NodeAnnouncement_write(ui
        LDKNodeAnnouncement obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NodeAnnouncement_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = NodeAnnouncement_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncement_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKNodeAnnouncement ret_var = NodeAnnouncement_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_NodeAnnouncementDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeAnnouncementDecodeErrorZ), "LDKCResult_NodeAnnouncementDecodeErrorZ");
+       *ret_conv = NodeAnnouncement_read(ser_ref);
+       return (long)ret_conv;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_QueryShortChannelIds_read(int8_tArray ser) {
@@ -12671,11 +15357,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_QueryShortChannelIds_writ
        LDKQueryShortChannelIds obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = QueryShortChannelIds_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = QueryShortChannelIds_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_read(int8_tArray ser) {
@@ -12691,11 +15377,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_ReplyShortChannelIdsEnd_w
        LDKReplyShortChannelIdsEnd obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ReplyShortChannelIdsEnd_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ReplyShortChannelIdsEnd_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_QueryChannelRange_read(int8_tArray ser) {
@@ -12711,11 +15397,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_QueryChannelRange_write(u
        LDKQueryChannelRange obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = QueryChannelRange_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = QueryChannelRange_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ReplyChannelRange_read(int8_tArray ser) {
@@ -12731,11 +15417,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_ReplyChannelRange_write(u
        LDKReplyChannelRange obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ReplyChannelRange_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ReplyChannelRange_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_GossipTimestampFilter_read(int8_tArray ser) {
@@ -12751,11 +15437,83 @@ int8_tArray  __attribute__((visibility("default"))) TS_GossipTimestampFilter_wri
        LDKGossipTimestampFilter obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = GossipTimestampFilter_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = GossipTimestampFilter_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+void  __attribute__((visibility("default"))) TS_IgnoringMessageHandler_free(uint32_t this_ptr) {
+       LDKIgnoringMessageHandler this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       IgnoringMessageHandler_free(this_ptr_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_IgnoringMessageHandler_new() {
+       LDKIgnoringMessageHandler ret_var = IgnoringMessageHandler_new();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_IgnoringMessageHandler_as_MessageSendEventsProvider(uint32_t this_arg) {
+       LDKIgnoringMessageHandler this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKMessageSendEventsProvider* ret = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
+       *ret = IgnoringMessageHandler_as_MessageSendEventsProvider(&this_arg_conv);
+       return (long)ret;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_IgnoringMessageHandler_as_RoutingMessageHandler(uint32_t this_arg) {
+       LDKIgnoringMessageHandler this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKRoutingMessageHandler* ret = MALLOC(sizeof(LDKRoutingMessageHandler), "LDKRoutingMessageHandler");
+       *ret = IgnoringMessageHandler_as_RoutingMessageHandler(&this_arg_conv);
+       return (long)ret;
+}
+
+void  __attribute__((visibility("default"))) TS_ErroringMessageHandler_free(uint32_t this_ptr) {
+       LDKErroringMessageHandler this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ErroringMessageHandler_free(this_ptr_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ErroringMessageHandler_new() {
+       LDKErroringMessageHandler ret_var = ErroringMessageHandler_new();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ErroringMessageHandler_as_MessageSendEventsProvider(uint32_t this_arg) {
+       LDKErroringMessageHandler this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKMessageSendEventsProvider* ret = MALLOC(sizeof(LDKMessageSendEventsProvider), "LDKMessageSendEventsProvider");
+       *ret = ErroringMessageHandler_as_MessageSendEventsProvider(&this_arg_conv);
+       return (long)ret;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ErroringMessageHandler_as_ChannelMessageHandler(uint32_t this_arg) {
+       LDKErroringMessageHandler this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKChannelMessageHandler* ret = MALLOC(sizeof(LDKChannelMessageHandler), "LDKChannelMessageHandler");
+       *ret = ErroringMessageHandler_as_ChannelMessageHandler(&this_arg_conv);
+       return (long)ret;
 }
 
 void  __attribute__((visibility("default"))) TS_MessageHandler_free(uint32_t this_ptr) {
@@ -12831,20 +15589,6 @@ void  __attribute__((visibility("default"))) TS_PeerHandleError_free(uint32_t th
        PeerHandleError_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_PeerHandleError_clone(uint32_t orig) {
-       LDKPeerHandleError orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKPeerHandleError ret_var = PeerHandleError_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 jboolean  __attribute__((visibility("default"))) TS_PeerHandleError_get_no_connection_possible(uint32_t this_ptr) {
        LDKPeerHandleError this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12871,6 +15615,20 @@ uint32_t  __attribute__((visibility("default"))) TS_PeerHandleError_new(jboolean
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_PeerHandleError_clone(uint32_t orig) {
+       LDKPeerHandleError orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKPeerHandleError ret_var = PeerHandleError_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_PeerManager_free(uint32_t this_ptr) {
        LDKPeerManager this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -12909,9 +15667,9 @@ ptrArray  __attribute__((visibility("default"))) TS_PeerManager_get_peer_node_id
        ptrArray ret_arr = init_arr(ret_var.datalen, sizeof(uint32_t), "Native ptrArray Bytes");
        int8_tArray *ret_arr_ptr = (int8_tArray*)(ret_arr + 4);
        for (size_t m = 0; m < ret_var.datalen; m++) {
-               int8_tArray arr_conv_12_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-               memcpy((uint8_t*)(arr_conv_12_arr + 4), ret_var.data[m].compressed_form, 33);
-               ret_arr_ptr[m] = arr_conv_12_arr;
+               int8_tArray ret_conv_12_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+               memcpy((uint8_t*)(ret_conv_12_arr + 4), ret_var.data[m].compressed_form, 33);
+               ret_arr_ptr[m] = ret_conv_12_arr;
        }
        FREE(ret_var.data);
        return ret_arr;
@@ -13000,9 +15758,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_build_commitment_secret(i
        CHECK(*((uint32_t*)commitment_seed) == 32);
        memcpy(commitment_seed_arr, (uint8_t*)(commitment_seed + 4), 32);
        unsigned char (*commitment_seed_ref)[32] = &commitment_seed_arr;
-       int8_tArray arg_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), build_commitment_secret(commitment_seed_ref, idx).data, 32);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), build_commitment_secret(commitment_seed_ref, idx).data, 32);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_derive_private_key(int8_tArray per_commitment_point, int8_tArray base_secret) {
@@ -13013,7 +15771,7 @@ uint32_t  __attribute__((visibility("default"))) TS_derive_private_key(int8_tArr
        CHECK(*((uint32_t*)base_secret) == 32);
        memcpy(base_secret_arr, (uint8_t*)(base_secret + 4), 32);
        unsigned char (*base_secret_ref)[32] = &base_secret_arr;
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
        *ret_conv = derive_private_key(per_commitment_point_ref, base_secret_ref);
        return (long)ret_conv;
 }
@@ -13025,7 +15783,7 @@ uint32_t  __attribute__((visibility("default"))) TS_derive_public_key(int8_tArra
        LDKPublicKey base_point_ref;
        CHECK(*((uint32_t*)base_point) == 33);
        memcpy(base_point_ref.compressed_form, (uint8_t*)(base_point + 4), 33);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
        *ret_conv = derive_public_key(per_commitment_point_ref, base_point_ref);
        return (long)ret_conv;
 }
@@ -13039,7 +15797,7 @@ uint32_t  __attribute__((visibility("default"))) TS_derive_private_revocation_ke
        CHECK(*((uint32_t*)countersignatory_revocation_base_secret) == 32);
        memcpy(countersignatory_revocation_base_secret_arr, (uint8_t*)(countersignatory_revocation_base_secret + 4), 32);
        unsigned char (*countersignatory_revocation_base_secret_ref)[32] = &countersignatory_revocation_base_secret_arr;
-       LDKCResult_SecretKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeySecpErrorZ), "LDKCResult_SecretKeySecpErrorZ");
+       LDKCResult_SecretKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_SecretKeyErrorZ), "LDKCResult_SecretKeyErrorZ");
        *ret_conv = derive_private_revocation_key(per_commitment_secret_ref, countersignatory_revocation_base_secret_ref);
        return (long)ret_conv;
 }
@@ -13051,7 +15809,7 @@ uint32_t  __attribute__((visibility("default"))) TS_derive_public_revocation_key
        LDKPublicKey countersignatory_revocation_base_point_ref;
        CHECK(*((uint32_t*)countersignatory_revocation_base_point) == 33);
        memcpy(countersignatory_revocation_base_point_ref.compressed_form, (uint8_t*)(countersignatory_revocation_base_point + 4), 33);
-       LDKCResult_PublicKeySecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeySecpErrorZ), "LDKCResult_PublicKeySecpErrorZ");
+       LDKCResult_PublicKeyErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_PublicKeyErrorZ), "LDKCResult_PublicKeyErrorZ");
        *ret_conv = derive_public_revocation_key(per_commitment_point_ref, countersignatory_revocation_base_point_ref);
        return (long)ret_conv;
 }
@@ -13063,27 +15821,13 @@ void  __attribute__((visibility("default"))) TS_TxCreationKeys_free(uint32_t thi
        TxCreationKeys_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_clone(uint32_t orig) {
-       LDKTxCreationKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKTxCreationKeys ret_var = TxCreationKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_TxCreationKeys_get_per_commitment_point(uint32_t this_ptr) {
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), TxCreationKeys_get_per_commitment_point(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), TxCreationKeys_get_per_commitment_point(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_TxCreationKeys_set_per_commitment_point(uint32_t this_ptr, int8_tArray val) {
@@ -13100,9 +15844,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_TxCreationKeys_get_revoca
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), TxCreationKeys_get_revocation_key(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), TxCreationKeys_get_revocation_key(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_TxCreationKeys_set_revocation_key(uint32_t this_ptr, int8_tArray val) {
@@ -13119,9 +15863,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_TxCreationKeys_get_broadc
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), TxCreationKeys_get_broadcaster_htlc_key(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), TxCreationKeys_get_broadcaster_htlc_key(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_TxCreationKeys_set_broadcaster_htlc_key(uint32_t this_ptr, int8_tArray val) {
@@ -13138,9 +15882,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_TxCreationKeys_get_counte
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), TxCreationKeys_get_countersignatory_htlc_key(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), TxCreationKeys_get_countersignatory_htlc_key(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_TxCreationKeys_set_countersignatory_htlc_key(uint32_t this_ptr, int8_tArray val) {
@@ -13157,9 +15901,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_TxCreationKeys_get_broadc
        LDKTxCreationKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), TxCreationKeys_get_broadcaster_delayed_payment_key(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), TxCreationKeys_get_broadcaster_delayed_payment_key(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_TxCreationKeys_set_broadcaster_delayed_payment_key(uint32_t this_ptr, int8_tArray val) {
@@ -13198,29 +15942,38 @@ uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_new(int8_tArr
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_clone(uint32_t orig) {
+       LDKTxCreationKeys orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKTxCreationKeys ret_var = TxCreationKeys_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_TxCreationKeys_write(uint32_t obj) {
        LDKTxCreationKeys obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = TxCreationKeys_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = TxCreationKeys_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKTxCreationKeys ret_var = TxCreationKeys_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_TxCreationKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysDecodeErrorZ), "LDKCResult_TxCreationKeysDecodeErrorZ");
+       *ret_conv = TxCreationKeys_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelPublicKeys_free(uint32_t this_ptr) {
@@ -13230,27 +15983,13 @@ void  __attribute__((visibility("default"))) TS_ChannelPublicKeys_free(uint32_t
        ChannelPublicKeys_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelPublicKeys_clone(uint32_t orig) {
-       LDKChannelPublicKeys orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelPublicKeys ret_var = ChannelPublicKeys_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelPublicKeys_get_funding_pubkey(uint32_t this_ptr) {
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelPublicKeys_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelPublicKeys_get_funding_pubkey(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelPublicKeys_set_funding_pubkey(uint32_t this_ptr, int8_tArray val) {
@@ -13267,9 +16006,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelPublicKeys_get_rev
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelPublicKeys_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelPublicKeys_get_revocation_basepoint(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelPublicKeys_set_revocation_basepoint(uint32_t this_ptr, int8_tArray val) {
@@ -13286,9 +16025,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelPublicKeys_get_pay
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelPublicKeys_get_payment_point(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelPublicKeys_get_payment_point(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelPublicKeys_set_payment_point(uint32_t this_ptr, int8_tArray val) {
@@ -13305,9 +16044,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelPublicKeys_get_del
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelPublicKeys_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelPublicKeys_get_delayed_payment_basepoint(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelPublicKeys_set_delayed_payment_basepoint(uint32_t this_ptr, int8_tArray val) {
@@ -13324,9 +16063,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelPublicKeys_get_htl
        LDKChannelPublicKeys this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelPublicKeys_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelPublicKeys_get_htlc_basepoint(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelPublicKeys_set_htlc_basepoint(uint32_t this_ptr, int8_tArray val) {
@@ -13365,29 +16104,38 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelPublicKeys_new(int8_t
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelPublicKeys_clone(uint32_t orig) {
+       LDKChannelPublicKeys orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelPublicKeys ret_var = ChannelPublicKeys_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelPublicKeys_write(uint32_t obj) {
        LDKChannelPublicKeys obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelPublicKeys_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelPublicKeys_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelPublicKeys_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelPublicKeys ret_var = ChannelPublicKeys_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelPublicKeysDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelPublicKeysDecodeErrorZ), "LDKCResult_ChannelPublicKeysDecodeErrorZ");
+       *ret_conv = ChannelPublicKeys_read(ser_ref);
+       return (long)ret_conv;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_derive_new(int8_tArray per_commitment_point, int8_tArray broadcaster_delayed_payment_base, int8_tArray broadcaster_htlc_base, int8_tArray countersignatory_revocation_base, int8_tArray countersignatory_htlc_base) {
@@ -13406,7 +16154,7 @@ uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_derive_new(in
        LDKPublicKey countersignatory_htlc_base_ref;
        CHECK(*((uint32_t*)countersignatory_htlc_base) == 33);
        memcpy(countersignatory_htlc_base_ref.compressed_form, (uint8_t*)(countersignatory_htlc_base + 4), 33);
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
        *ret_conv = TxCreationKeys_derive_new(per_commitment_point_ref, broadcaster_delayed_payment_base_ref, broadcaster_htlc_base_ref, countersignatory_revocation_base_ref, countersignatory_htlc_base_ref);
        return (long)ret_conv;
 }
@@ -13421,7 +16169,7 @@ uint32_t  __attribute__((visibility("default"))) TS_TxCreationKeys_from_channel_
        LDKChannelPublicKeys countersignatory_keys_conv;
        countersignatory_keys_conv.inner = (void*)(countersignatory_keys & (~1));
        countersignatory_keys_conv.is_owned = false;
-       LDKCResult_TxCreationKeysSecpErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysSecpErrorZ), "LDKCResult_TxCreationKeysSecpErrorZ");
+       LDKCResult_TxCreationKeysErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_TxCreationKeysErrorZ), "LDKCResult_TxCreationKeysErrorZ");
        *ret_conv = TxCreationKeys_from_channel_static_keys(per_commitment_point_ref, &broadcaster_keys_conv, &countersignatory_keys_conv);
        return (long)ret_conv;
 }
@@ -13433,11 +16181,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_get_revokeable_redeemscri
        LDKPublicKey broadcaster_delayed_payment_key_ref;
        CHECK(*((uint32_t*)broadcaster_delayed_payment_key) == 33);
        memcpy(broadcaster_delayed_payment_key_ref.compressed_form, (uint8_t*)(broadcaster_delayed_payment_key + 4), 33);
-       LDKCVec_u8Z arg_var = get_revokeable_redeemscript(revocation_key_ref, contest_delay, broadcaster_delayed_payment_key_ref);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = get_revokeable_redeemscript(revocation_key_ref, contest_delay, broadcaster_delayed_payment_key_ref);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_free(uint32_t this_ptr) {
@@ -13447,20 +16195,6 @@ void  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_free(uint
        HTLCOutputInCommitment_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_clone(uint32_t orig) {
-       LDKHTLCOutputInCommitment orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 jboolean  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_get_offered(uint32_t this_ptr) {
        LDKHTLCOutputInCommitment this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -13525,29 +16259,38 @@ void  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_set_payme
        HTLCOutputInCommitment_set_payment_hash(&this_ptr_conv, val_ref);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_clone(uint32_t orig) {
+       LDKHTLCOutputInCommitment orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_write(uint32_t obj) {
        LDKHTLCOutputInCommitment obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = HTLCOutputInCommitment_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = HTLCOutputInCommitment_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_HTLCOutputInCommitment_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKHTLCOutputInCommitment ret_var = HTLCOutputInCommitment_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_HTLCOutputInCommitmentDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HTLCOutputInCommitmentDecodeErrorZ), "LDKCResult_HTLCOutputInCommitmentDecodeErrorZ");
+       *ret_conv = HTLCOutputInCommitment_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_get_htlc_redeemscript(uint32_t htlc, uint32_t keys) {
@@ -13557,11 +16300,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_get_htlc_redeemscript(uin
        LDKTxCreationKeys keys_conv;
        keys_conv.inner = (void*)(keys & (~1));
        keys_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = get_htlc_redeemscript(&htlc_conv, &keys_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = get_htlc_redeemscript(&htlc_conv, &keys_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_make_funding_redeemscript(int8_tArray broadcaster, int8_tArray countersignatory) {
@@ -13571,11 +16314,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_make_funding_redeemscript
        LDKPublicKey countersignatory_ref;
        CHECK(*((uint32_t*)countersignatory) == 33);
        memcpy(countersignatory_ref.compressed_form, (uint8_t*)(countersignatory + 4), 33);
-       LDKCVec_u8Z arg_var = make_funding_redeemscript(broadcaster_ref, countersignatory_ref);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = make_funding_redeemscript(broadcaster_ref, countersignatory_ref);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_build_htlc_transaction(int8_tArray prev_hash, int32_t feerate_per_kw, int16_t contest_delay, uint32_t htlc, int8_tArray broadcaster_delayed_payment_key, int8_tArray revocation_key) {
@@ -13592,11 +16335,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_build_htlc_transaction(in
        LDKPublicKey revocation_key_ref;
        CHECK(*((uint32_t*)revocation_key) == 33);
        memcpy(revocation_key_ref.compressed_form, (uint8_t*)(revocation_key + 4), 33);
-       LDKTransaction arg_var = build_htlc_transaction(prev_hash_ref, feerate_per_kw, contest_delay, &htlc_conv, broadcaster_delayed_payment_key_ref, revocation_key_ref);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       Transaction_free(arg_var);
-       return arg_arr;
+       LDKTransaction ret_var = build_htlc_transaction(prev_hash_ref, feerate_per_kw, contest_delay, &htlc_conv, broadcaster_delayed_payment_key_ref, revocation_key_ref);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       Transaction_free(ret_var);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_free(uint32_t this_ptr) {
@@ -13606,20 +16349,6 @@ void  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_fre
        ChannelTransactionParameters_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_clone(uint32_t orig) {
-       LDKChannelTransactionParameters orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_get_holder_pubkeys(uint32_t this_ptr) {
        LDKChannelTransactionParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -13748,6 +16477,20 @@ uint32_t  __attribute__((visibility("default"))) TS_ChannelTransactionParameters
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_clone(uint32_t orig) {
+       LDKChannelTransactionParameters orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionParameters_free(uint32_t this_ptr) {
        LDKCounterpartyChannelTransactionParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -13755,20 +16498,6 @@ void  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionPa
        CounterpartyChannelTransactionParameters_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionParameters_clone(uint32_t orig) {
-       LDKCounterpartyChannelTransactionParameters orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionParameters_get_pubkeys(uint32_t this_ptr) {
        LDKCounterpartyChannelTransactionParameters this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -13824,6 +16553,20 @@ uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransacti
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionParameters_clone(uint32_t orig) {
+       LDKCounterpartyChannelTransactionParameters orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 jboolean  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_is_populated(uint32_t this_arg) {
        LDKChannelTransactionParameters this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -13864,50 +16607,40 @@ int8_tArray  __attribute__((visibility("default"))) TS_CounterpartyChannelTransa
        LDKCounterpartyChannelTransactionParameters obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = CounterpartyChannelTransactionParameters_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = CounterpartyChannelTransactionParameters_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_CounterpartyChannelTransactionParameters_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKCounterpartyChannelTransactionParameters ret_var = CounterpartyChannelTransactionParameters_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ), "LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = CounterpartyChannelTransactionParameters_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_write(uint32_t obj) {
        LDKChannelTransactionParameters obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelTransactionParameters_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelTransactionParameters_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelTransactionParameters_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelTransactionParameters ret_var = ChannelTransactionParameters_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelTransactionParametersDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelTransactionParametersDecodeErrorZ), "LDKCResult_ChannelTransactionParametersDecodeErrorZ");
+       *ret_conv = ChannelTransactionParameters_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_DirectedChannelTransactionParameters_free(uint32_t this_ptr) {
@@ -13982,27 +16715,13 @@ void  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_free
        HolderCommitmentTransaction_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_clone(uint32_t orig) {
-       LDKHolderCommitmentTransaction orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_get_counterparty_sig(uint32_t this_ptr) {
        LDKHolderCommitmentTransaction this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), HolderCommitmentTransaction_get_counterparty_sig(&this_ptr_conv).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), HolderCommitmentTransaction_get_counterparty_sig(&this_ptr_conv).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_set_counterparty_sig(uint32_t this_ptr, int8_tArray val) {
@@ -14027,38 +16746,47 @@ void  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_set_
                val_constr.data = NULL;
        int8_tArray* val_vals = (int8_tArray*)(val + 4);
        for (size_t m = 0; m < val_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = val_vals[m];
-               LDKSignature arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 64);
-               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
-               val_constr.data[m] = arr_conv_12_ref;
+               int8_tArray val_conv_12 = val_vals[m];
+               LDKSignature val_conv_12_ref;
+               CHECK(*((uint32_t*)val_conv_12) == 64);
+               memcpy(val_conv_12_ref.compact_form, (uint8_t*)(val_conv_12 + 4), 64);
+               val_constr.data[m] = val_conv_12_ref;
        }
        HolderCommitmentTransaction_set_counterparty_htlc_sigs(&this_ptr_conv, val_constr);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_clone(uint32_t orig) {
+       LDKHolderCommitmentTransaction orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_write(uint32_t obj) {
        LDKHolderCommitmentTransaction obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = HolderCommitmentTransaction_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = HolderCommitmentTransaction_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKHolderCommitmentTransaction ret_var = HolderCommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_HolderCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_HolderCommitmentTransactionDecodeErrorZ), "LDKCResult_HolderCommitmentTransactionDecodeErrorZ");
+       *ret_conv = HolderCommitmentTransaction_read(ser_ref);
+       return (long)ret_conv;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_new(uint32_t commitment_tx, int8_tArray counterparty_sig, ptrArray counterparty_htlc_sigs, int8_tArray holder_funding_key, int8_tArray counterparty_funding_key) {
@@ -14077,11 +16805,11 @@ uint32_t  __attribute__((visibility("default"))) TS_HolderCommitmentTransaction_
                counterparty_htlc_sigs_constr.data = NULL;
        int8_tArray* counterparty_htlc_sigs_vals = (int8_tArray*)(counterparty_htlc_sigs + 4);
        for (size_t m = 0; m < counterparty_htlc_sigs_constr.datalen; m++) {
-               int8_tArray arr_conv_12 = counterparty_htlc_sigs_vals[m];
-               LDKSignature arr_conv_12_ref;
-               CHECK(*((uint32_t*)arr_conv_12) == 64);
-               memcpy(arr_conv_12_ref.compact_form, (uint8_t*)(arr_conv_12 + 4), 64);
-               counterparty_htlc_sigs_constr.data[m] = arr_conv_12_ref;
+               int8_tArray counterparty_htlc_sigs_conv_12 = counterparty_htlc_sigs_vals[m];
+               LDKSignature counterparty_htlc_sigs_conv_12_ref;
+               CHECK(*((uint32_t*)counterparty_htlc_sigs_conv_12) == 64);
+               memcpy(counterparty_htlc_sigs_conv_12_ref.compact_form, (uint8_t*)(counterparty_htlc_sigs_conv_12 + 4), 64);
+               counterparty_htlc_sigs_constr.data[m] = counterparty_htlc_sigs_conv_12_ref;
        }
        LDKPublicKey holder_funding_key_ref;
        CHECK(*((uint32_t*)holder_funding_key) == 33);
@@ -14106,29 +16834,15 @@ void  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_free(
        BuiltCommitmentTransaction_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_clone(uint32_t orig) {
-       LDKBuiltCommitmentTransaction orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_get_transaction(uint32_t this_ptr) {
        LDKBuiltCommitmentTransaction this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       LDKTransaction arg_var = BuiltCommitmentTransaction_get_transaction(&this_ptr_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       Transaction_free(arg_var);
-       return arg_arr;
+       LDKTransaction ret_var = BuiltCommitmentTransaction_get_transaction(&this_ptr_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       Transaction_free(ret_var);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_set_transaction(uint32_t this_ptr, int8_tArray val) {
@@ -14181,29 +16895,38 @@ uint32_t  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_n
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_clone(uint32_t orig) {
+       LDKBuiltCommitmentTransaction orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_write(uint32_t obj) {
        LDKBuiltCommitmentTransaction obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = BuiltCommitmentTransaction_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = BuiltCommitmentTransaction_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKBuiltCommitmentTransaction ret_var = BuiltCommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_BuiltCommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_BuiltCommitmentTransactionDecodeErrorZ), "LDKCResult_BuiltCommitmentTransactionDecodeErrorZ");
+       *ret_conv = BuiltCommitmentTransaction_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_get_sighash_all(uint32_t this_arg, int8_tArray funding_redeemscript, int64_t channel_value_satoshis) {
@@ -14213,9 +16936,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_BuiltCommitmentTransactio
        LDKu8slice funding_redeemscript_ref;
        funding_redeemscript_ref.datalen = *((uint32_t*)funding_redeemscript);
        funding_redeemscript_ref.data = (int8_t*)(funding_redeemscript + 4);
-       int8_tArray arg_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), BuiltCommitmentTransaction_get_sighash_all(&this_arg_conv, funding_redeemscript_ref, channel_value_satoshis).data, 32);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), BuiltCommitmentTransaction_get_sighash_all(&this_arg_conv, funding_redeemscript_ref, channel_value_satoshis).data, 32);
+       return ret_arr;
 }
 
 int8_tArray  __attribute__((visibility("default"))) TS_BuiltCommitmentTransaction_sign(uint32_t this_arg, int8_tArray funding_key, int8_tArray funding_redeemscript, int64_t channel_value_satoshis) {
@@ -14229,9 +16952,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_BuiltCommitmentTransactio
        LDKu8slice funding_redeemscript_ref;
        funding_redeemscript_ref.datalen = *((uint32_t*)funding_redeemscript);
        funding_redeemscript_ref.data = (int8_t*)(funding_redeemscript + 4);
-       int8_tArray arg_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), BuiltCommitmentTransaction_sign(&this_arg_conv, funding_key_ref, funding_redeemscript_ref, channel_value_satoshis).compact_form, 64);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(64, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), BuiltCommitmentTransaction_sign(&this_arg_conv, funding_key_ref, funding_redeemscript_ref, channel_value_satoshis).compact_form, 64);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_CommitmentTransaction_free(uint32_t this_ptr) {
@@ -14259,25 +16982,20 @@ int8_tArray  __attribute__((visibility("default"))) TS_CommitmentTransaction_wri
        LDKCommitmentTransaction obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = CommitmentTransaction_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = CommitmentTransaction_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_CommitmentTransaction_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKCommitmentTransaction ret_var = CommitmentTransaction_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_CommitmentTransactionDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_CommitmentTransactionDecodeErrorZ), "LDKCResult_CommitmentTransactionDecodeErrorZ");
+       *ret_conv = CommitmentTransaction_read(ser_ref);
+       return (long)ret_conv;
 }
 
 int64_t  __attribute__((visibility("default"))) TS_CommitmentTransaction_commitment_number(uint32_t this_arg) {
@@ -14355,9 +17073,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_TrustedCommitmentTransact
        LDKTrustedCommitmentTransaction this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
        this_arg_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), TrustedCommitmentTransaction_txid(&this_arg_conv).data, 32);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(32, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), TrustedCommitmentTransaction_txid(&this_arg_conv).data, 32);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_TrustedCommitmentTransaction_built_transaction(uint32_t this_arg) {
@@ -14415,6 +17133,48 @@ int64_t  __attribute__((visibility("default"))) TS_get_commitment_transaction_nu
        return ret_val;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_InitFeatures_clone(uint32_t orig) {
+       LDKInitFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKInitFeatures ret_var = InitFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_NodeFeatures_clone(uint32_t orig) {
+       LDKNodeFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeFeatures ret_var = NodeFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ChannelFeatures_clone(uint32_t orig) {
+       LDKChannelFeatures orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelFeatures ret_var = ChannelFeatures_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_InitFeatures_free(uint32_t this_ptr) {
        LDKInitFeatures this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14429,11 +17189,137 @@ void  __attribute__((visibility("default"))) TS_NodeFeatures_free(uint32_t this_
        NodeFeatures_free(this_ptr_conv);
 }
 
-void  __attribute__((visibility("default"))) TS_ChannelFeatures_free(uint32_t this_ptr) {
-       LDKChannelFeatures this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       ChannelFeatures_free(this_ptr_conv);
+void  __attribute__((visibility("default"))) TS_ChannelFeatures_free(uint32_t this_ptr) {
+       LDKChannelFeatures this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       ChannelFeatures_free(this_ptr_conv);
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_InitFeatures_empty() {
+       LDKInitFeatures ret_var = InitFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_InitFeatures_known() {
+       LDKInitFeatures ret_var = InitFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_NodeFeatures_empty() {
+       LDKNodeFeatures ret_var = NodeFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_NodeFeatures_known() {
+       LDKNodeFeatures ret_var = NodeFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ChannelFeatures_empty() {
+       LDKChannelFeatures ret_var = ChannelFeatures_empty();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ChannelFeatures_known() {
+       LDKChannelFeatures ret_var = ChannelFeatures_known();
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_InitFeatures_write(uint32_t obj) {
+       LDKInitFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = InitFeatures_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_NodeFeatures_write(uint32_t obj) {
+       LDKNodeFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = NodeFeatures_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+int8_tArray  __attribute__((visibility("default"))) TS_ChannelFeatures_write(uint32_t obj) {
+       LDKChannelFeatures obj_conv;
+       obj_conv.inner = (void*)(obj & (~1));
+       obj_conv.is_owned = false;
+       LDKCVec_u8Z ret_var = ChannelFeatures_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_InitFeatures_read(int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = *((uint32_t*)ser);
+       ser_ref.data = (int8_t*)(ser + 4);
+       LDKCResult_InitFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_InitFeaturesDecodeErrorZ), "LDKCResult_InitFeaturesDecodeErrorZ");
+       *ret_conv = InitFeatures_read(ser_ref);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_NodeFeatures_read(int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = *((uint32_t*)ser);
+       ser_ref.data = (int8_t*)(ser + 4);
+       LDKCResult_NodeFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_NodeFeaturesDecodeErrorZ), "LDKCResult_NodeFeaturesDecodeErrorZ");
+       *ret_conv = NodeFeatures_read(ser_ref);
+       return (long)ret_conv;
+}
+
+uint32_t  __attribute__((visibility("default"))) TS_ChannelFeatures_read(int8_tArray ser) {
+       LDKu8slice ser_ref;
+       ser_ref.datalen = *((uint32_t*)ser);
+       ser_ref.data = (int8_t*)(ser + 4);
+       LDKCResult_ChannelFeaturesDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelFeaturesDecodeErrorZ), "LDKCResult_ChannelFeaturesDecodeErrorZ");
+       *ret_conv = ChannelFeatures_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_RouteHop_free(uint32_t this_ptr) {
@@ -14443,27 +17329,13 @@ void  __attribute__((visibility("default"))) TS_RouteHop_free(uint32_t this_ptr)
        RouteHop_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RouteHop_clone(uint32_t orig) {
-       LDKRouteHop orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRouteHop ret_var = RouteHop_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_RouteHop_get_pubkey(uint32_t this_ptr) {
        LDKRouteHop this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), RouteHop_get_pubkey(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), RouteHop_get_pubkey(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_RouteHop_set_pubkey(uint32_t this_ptr, int8_tArray val) {
@@ -14497,7 +17369,7 @@ void  __attribute__((visibility("default"))) TS_RouteHop_set_node_features(uint3
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        RouteHop_set_node_features(&this_ptr_conv, val_conv);
 }
 
@@ -14537,7 +17409,7 @@ void  __attribute__((visibility("default"))) TS_RouteHop_set_channel_features(ui
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        RouteHop_set_channel_features(&this_ptr_conv, val_conv);
 }
 
@@ -14578,11 +17450,11 @@ uint32_t  __attribute__((visibility("default"))) TS_RouteHop_new(int8_tArray pub
        LDKNodeFeatures node_features_arg_conv;
        node_features_arg_conv.inner = (void*)(node_features_arg & (~1));
        node_features_arg_conv.is_owned = (node_features_arg & 1) || (node_features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       node_features_arg_conv = NodeFeatures_clone(&node_features_arg_conv);
        LDKChannelFeatures channel_features_arg_conv;
        channel_features_arg_conv.inner = (void*)(channel_features_arg & (~1));
        channel_features_arg_conv.is_owned = (channel_features_arg & 1) || (channel_features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       channel_features_arg_conv = ChannelFeatures_clone(&channel_features_arg_conv);
        LDKRouteHop ret_var = RouteHop_new(pubkey_arg_ref, node_features_arg_conv, short_channel_id_arg, channel_features_arg_conv, fee_msat_arg, cltv_expiry_delta_arg);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
@@ -14593,18 +17465,11 @@ uint32_t  __attribute__((visibility("default"))) TS_RouteHop_new(int8_tArray pub
        return ret_ref;
 }
 
-void  __attribute__((visibility("default"))) TS_Route_free(uint32_t this_ptr) {
-       LDKRoute this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
-       Route_free(this_ptr_conv);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_Route_clone(uint32_t orig) {
-       LDKRoute orig_conv;
+uint32_t  __attribute__((visibility("default"))) TS_RouteHop_clone(uint32_t orig) {
+       LDKRouteHop orig_conv;
        orig_conv.inner = (void*)(orig & (~1));
        orig_conv.is_owned = false;
-       LDKRoute ret_var = Route_clone(&orig_conv);
+       LDKRouteHop ret_var = RouteHop_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -14614,6 +17479,13 @@ uint32_t  __attribute__((visibility("default"))) TS_Route_clone(uint32_t orig) {
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_Route_free(uint32_t this_ptr) {
+       LDKRoute this_ptr_conv;
+       this_ptr_conv.inner = (void*)(this_ptr & (~1));
+       this_ptr_conv.is_owned = (this_ptr & 1) || (this_ptr == 0);
+       Route_free(this_ptr_conv);
+}
+
 void  __attribute__((visibility("default"))) TS_Route_set_paths(uint32_t this_ptr, ptrArray val) {
        LDKRoute this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14626,23 +17498,23 @@ void  __attribute__((visibility("default"))) TS_Route_set_paths(uint32_t this_pt
                val_constr.data = NULL;
        uint32_tArray* val_vals = (uint32_tArray*)(val + 4);
        for (size_t m = 0; m < val_constr.datalen; m++) {
-               uint32_tArray arr_conv_12 = val_vals[m];
-               LDKCVec_RouteHopZ arr_conv_12_constr;
-               arr_conv_12_constr.datalen = *((uint32_t*)arr_conv_12);
-               if (arr_conv_12_constr.datalen > 0)
-                       arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+               uint32_tArray val_conv_12 = val_vals[m];
+               LDKCVec_RouteHopZ val_conv_12_constr;
+               val_conv_12_constr.datalen = *((uint32_t*)val_conv_12);
+               if (val_conv_12_constr.datalen > 0)
+                       val_conv_12_constr.data = MALLOC(val_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
                else
-                       arr_conv_12_constr.data = NULL;
-               uint32_t* arr_conv_12_vals = (uint32_t*)(arr_conv_12 + 4);
-               for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
-                       uint32_t arr_conv_10 = arr_conv_12_vals[k];
-                       LDKRouteHop arr_conv_10_conv;
-                       arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-                       arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-                       arr_conv_10_conv = RouteHop_clone(&arr_conv_10_conv);
-                       arr_conv_12_constr.data[k] = arr_conv_10_conv;
+                       val_conv_12_constr.data = NULL;
+               uint32_t* val_conv_12_vals = (uint32_t*)(val_conv_12 + 4);
+               for (size_t k = 0; k < val_conv_12_constr.datalen; k++) {
+                       uint32_t val_conv_12_conv_10 = val_conv_12_vals[k];
+                       LDKRouteHop val_conv_12_conv_10_conv;
+                       val_conv_12_conv_10_conv.inner = (void*)(val_conv_12_conv_10 & (~1));
+                       val_conv_12_conv_10_conv.is_owned = (val_conv_12_conv_10 & 1) || (val_conv_12_conv_10 == 0);
+                       val_conv_12_conv_10_conv = RouteHop_clone(&val_conv_12_conv_10_conv);
+                       val_conv_12_constr.data[k] = val_conv_12_conv_10_conv;
                }
-               val_constr.data[m] = arr_conv_12_constr;
+               val_constr.data[m] = val_conv_12_constr;
        }
        Route_set_paths(&this_ptr_conv, val_constr);
 }
@@ -14656,23 +17528,23 @@ uint32_t  __attribute__((visibility("default"))) TS_Route_new(ptrArray paths_arg
                paths_arg_constr.data = NULL;
        uint32_tArray* paths_arg_vals = (uint32_tArray*)(paths_arg + 4);
        for (size_t m = 0; m < paths_arg_constr.datalen; m++) {
-               uint32_tArray arr_conv_12 = paths_arg_vals[m];
-               LDKCVec_RouteHopZ arr_conv_12_constr;
-               arr_conv_12_constr.datalen = *((uint32_t*)arr_conv_12);
-               if (arr_conv_12_constr.datalen > 0)
-                       arr_conv_12_constr.data = MALLOC(arr_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
+               uint32_tArray paths_arg_conv_12 = paths_arg_vals[m];
+               LDKCVec_RouteHopZ paths_arg_conv_12_constr;
+               paths_arg_conv_12_constr.datalen = *((uint32_t*)paths_arg_conv_12);
+               if (paths_arg_conv_12_constr.datalen > 0)
+                       paths_arg_conv_12_constr.data = MALLOC(paths_arg_conv_12_constr.datalen * sizeof(LDKRouteHop), "LDKCVec_RouteHopZ Elements");
                else
-                       arr_conv_12_constr.data = NULL;
-               uint32_t* arr_conv_12_vals = (uint32_t*)(arr_conv_12 + 4);
-               for (size_t k = 0; k < arr_conv_12_constr.datalen; k++) {
-                       uint32_t arr_conv_10 = arr_conv_12_vals[k];
-                       LDKRouteHop arr_conv_10_conv;
-                       arr_conv_10_conv.inner = (void*)(arr_conv_10 & (~1));
-                       arr_conv_10_conv.is_owned = (arr_conv_10 & 1) || (arr_conv_10 == 0);
-                       arr_conv_10_conv = RouteHop_clone(&arr_conv_10_conv);
-                       arr_conv_12_constr.data[k] = arr_conv_10_conv;
+                       paths_arg_conv_12_constr.data = NULL;
+               uint32_t* paths_arg_conv_12_vals = (uint32_t*)(paths_arg_conv_12 + 4);
+               for (size_t k = 0; k < paths_arg_conv_12_constr.datalen; k++) {
+                       uint32_t paths_arg_conv_12_conv_10 = paths_arg_conv_12_vals[k];
+                       LDKRouteHop paths_arg_conv_12_conv_10_conv;
+                       paths_arg_conv_12_conv_10_conv.inner = (void*)(paths_arg_conv_12_conv_10 & (~1));
+                       paths_arg_conv_12_conv_10_conv.is_owned = (paths_arg_conv_12_conv_10 & 1) || (paths_arg_conv_12_conv_10 == 0);
+                       paths_arg_conv_12_conv_10_conv = RouteHop_clone(&paths_arg_conv_12_conv_10_conv);
+                       paths_arg_conv_12_constr.data[k] = paths_arg_conv_12_conv_10_conv;
                }
-               paths_arg_constr.data[m] = arr_conv_12_constr;
+               paths_arg_constr.data[m] = paths_arg_conv_12_constr;
        }
        LDKRoute ret_var = Route_new(paths_arg_constr);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
@@ -14684,15 +17556,29 @@ uint32_t  __attribute__((visibility("default"))) TS_Route_new(ptrArray paths_arg
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_Route_clone(uint32_t orig) {
+       LDKRoute orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRoute ret_var = Route_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_Route_write(uint32_t obj) {
        LDKRoute obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = Route_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = Route_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_Route_read(int8_tArray ser) {
@@ -14711,27 +17597,13 @@ void  __attribute__((visibility("default"))) TS_RouteHint_free(uint32_t this_ptr
        RouteHint_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RouteHint_clone(uint32_t orig) {
-       LDKRouteHint orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRouteHint ret_var = RouteHint_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int8_tArray  __attribute__((visibility("default"))) TS_RouteHint_get_src_node_id(uint32_t this_ptr) {
        LDKRouteHint this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), RouteHint_get_src_node_id(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), RouteHint_get_src_node_id(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_RouteHint_set_src_node_id(uint32_t this_ptr, int8_tArray val) {
@@ -14799,30 +17671,11 @@ void  __attribute__((visibility("default"))) TS_RouteHint_set_cltv_expiry_delta(
        RouteHint_set_cltv_expiry_delta(&this_ptr_conv, val);
 }
 
-int64_t  __attribute__((visibility("default"))) TS_RouteHint_get_htlc_minimum_msat(uint32_t this_ptr) {
-       LDKRouteHint this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = false;
-       int64_t ret_val = RouteHint_get_htlc_minimum_msat(&this_ptr_conv);
-       return ret_val;
-}
-
-void  __attribute__((visibility("default"))) TS_RouteHint_set_htlc_minimum_msat(uint32_t this_ptr, int64_t val) {
-       LDKRouteHint this_ptr_conv;
-       this_ptr_conv.inner = (void*)(this_ptr & (~1));
-       this_ptr_conv.is_owned = false;
-       RouteHint_set_htlc_minimum_msat(&this_ptr_conv, val);
-}
-
-uint32_t  __attribute__((visibility("default"))) TS_RouteHint_new(int8_tArray src_node_id_arg, int64_t short_channel_id_arg, uint32_t fees_arg, int16_t cltv_expiry_delta_arg, int64_t htlc_minimum_msat_arg) {
-       LDKPublicKey src_node_id_arg_ref;
-       CHECK(*((uint32_t*)src_node_id_arg) == 33);
-       memcpy(src_node_id_arg_ref.compressed_form, (uint8_t*)(src_node_id_arg + 4), 33);
-       LDKRoutingFees fees_arg_conv;
-       fees_arg_conv.inner = (void*)(fees_arg & (~1));
-       fees_arg_conv.is_owned = (fees_arg & 1) || (fees_arg == 0);
-       fees_arg_conv = RoutingFees_clone(&fees_arg_conv);
-       LDKRouteHint ret_var = RouteHint_new(src_node_id_arg_ref, short_channel_id_arg, fees_arg_conv, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
+uint32_t  __attribute__((visibility("default"))) TS_RouteHint_clone(uint32_t orig) {
+       LDKRouteHint orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRouteHint ret_var = RouteHint_clone(&orig_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
        long ret_ref = (long)ret_var.inner;
@@ -14832,16 +17685,16 @@ uint32_t  __attribute__((visibility("default"))) TS_RouteHint_new(int8_tArray sr
        return ret_ref;
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_get_route(int8_tArray our_node_id, uint32_t network, int8_tArray target, uint32_tArray first_hops, uint32_tArray last_hops, int64_t final_value_msat, int32_t final_cltv, uint32_t logger) {
+uint32_t  __attribute__((visibility("default"))) TS_get_route(int8_tArray our_node_id, uint32_t network, int8_tArray payee, uint32_tArray first_hops, uint32_tArray last_hops, int64_t final_value_msat, int32_t final_cltv, uint32_t logger) {
        LDKPublicKey our_node_id_ref;
        CHECK(*((uint32_t*)our_node_id) == 33);
        memcpy(our_node_id_ref.compressed_form, (uint8_t*)(our_node_id + 4), 33);
        LDKNetworkGraph network_conv;
        network_conv.inner = (void*)(network & (~1));
        network_conv.is_owned = false;
-       LDKPublicKey target_ref;
-       CHECK(*((uint32_t*)target) == 33);
-       memcpy(target_ref.compressed_form, (uint8_t*)(target + 4), 33);
+       LDKPublicKey payee_ref;
+       CHECK(*((uint32_t*)payee) == 33);
+       memcpy(payee_ref.compressed_form, (uint8_t*)(payee + 4), 33);
        LDKCVec_ChannelDetailsZ first_hops_constr;
        first_hops_constr.datalen = *((uint32_t*)first_hops);
        if (first_hops_constr.datalen > 0)
@@ -14850,11 +17703,11 @@ uint32_t  __attribute__((visibility("default"))) TS_get_route(int8_tArray our_no
                first_hops_constr.data = NULL;
        uint32_t* first_hops_vals = (uint32_t*)(first_hops + 4);
        for (size_t q = 0; q < first_hops_constr.datalen; q++) {
-               uint32_t arr_conv_16 = first_hops_vals[q];
-               LDKChannelDetails arr_conv_16_conv;
-               arr_conv_16_conv.inner = (void*)(arr_conv_16 & (~1));
-               arr_conv_16_conv.is_owned = (arr_conv_16 & 1) || (arr_conv_16 == 0);
-               first_hops_constr.data[q] = arr_conv_16_conv;
+               uint32_t first_hops_conv_16 = first_hops_vals[q];
+               LDKChannelDetails first_hops_conv_16_conv;
+               first_hops_conv_16_conv.inner = (void*)(first_hops_conv_16 & (~1));
+               first_hops_conv_16_conv.is_owned = (first_hops_conv_16 & 1) || (first_hops_conv_16 == 0);
+               first_hops_constr.data[q] = first_hops_conv_16_conv;
        }
        LDKCVec_RouteHintZ last_hops_constr;
        last_hops_constr.datalen = *((uint32_t*)last_hops);
@@ -14864,16 +17717,16 @@ uint32_t  __attribute__((visibility("default"))) TS_get_route(int8_tArray our_no
                last_hops_constr.data = NULL;
        uint32_t* last_hops_vals = (uint32_t*)(last_hops + 4);
        for (size_t l = 0; l < last_hops_constr.datalen; l++) {
-               uint32_t arr_conv_11 = last_hops_vals[l];
-               LDKRouteHint arr_conv_11_conv;
-               arr_conv_11_conv.inner = (void*)(arr_conv_11 & (~1));
-               arr_conv_11_conv.is_owned = (arr_conv_11 & 1) || (arr_conv_11 == 0);
-               arr_conv_11_conv = RouteHint_clone(&arr_conv_11_conv);
-               last_hops_constr.data[l] = arr_conv_11_conv;
+               uint32_t last_hops_conv_11 = last_hops_vals[l];
+               LDKRouteHint last_hops_conv_11_conv;
+               last_hops_conv_11_conv.inner = (void*)(last_hops_conv_11 & (~1));
+               last_hops_conv_11_conv.is_owned = (last_hops_conv_11 & 1) || (last_hops_conv_11 == 0);
+               last_hops_conv_11_conv = RouteHint_clone(&last_hops_conv_11_conv);
+               last_hops_constr.data[l] = last_hops_conv_11_conv;
        }
        LDKLogger logger_conv = *(LDKLogger*)(((uint64_t)logger) & ~1);
        LDKCResult_RouteLightningErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_RouteLightningErrorZ), "LDKCResult_RouteLightningErrorZ");
-       *ret_conv = get_route(our_node_id_ref, &network_conv, target_ref, &first_hops_constr, last_hops_constr, final_value_msat, final_cltv, logger_conv);
+       *ret_conv = get_route(our_node_id_ref, &network_conv, payee_ref, &first_hops_constr, last_hops_constr, final_value_msat, final_cltv, logger_conv);
        FREE(first_hops_constr.data);
        return (long)ret_conv;
 }
@@ -14885,6 +17738,20 @@ void  __attribute__((visibility("default"))) TS_NetworkGraph_free(uint32_t this_
        NetworkGraph_free(this_ptr_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_NetworkGraph_clone(uint32_t orig) {
+       LDKNetworkGraph orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNetworkGraph ret_var = NetworkGraph_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 void  __attribute__((visibility("default"))) TS_LockedNetworkGraph_free(uint32_t this_ptr) {
        LDKLockedNetworkGraph this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -14921,7 +17788,7 @@ uint32_t  __attribute__((visibility("default"))) TS_NetGraphMsgHandler_from_net_
        LDKNetworkGraph network_graph_conv;
        network_graph_conv.inner = (void*)(network_graph & (~1));
        network_graph_conv.is_owned = (network_graph & 1) || (network_graph == 0);
-       // Warning: we need a move here but no clone is available for LDKNetworkGraph
+       network_graph_conv = NetworkGraph_clone(&network_graph_conv);
        LDKNetGraphMsgHandler ret_var = NetGraphMsgHandler_from_net_graph(chain_access_conv, logger_conv, network_graph_conv);
        CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
        CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
@@ -14932,6 +17799,14 @@ uint32_t  __attribute__((visibility("default"))) TS_NetGraphMsgHandler_from_net_
        return ret_ref;
 }
 
+void  __attribute__((visibility("default"))) TS_NetGraphMsgHandler_add_chain_access(uint32_t this_arg, uint32_t chain_access) {
+       LDKNetGraphMsgHandler this_arg_conv;
+       this_arg_conv.inner = (void*)(this_arg & (~1));
+       this_arg_conv.is_owned = false;
+       LDKAccess* chain_access_conv = (LDKAccess*)chain_access;
+       NetGraphMsgHandler_add_chain_access(&this_arg_conv, chain_access_conv);
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_NetGraphMsgHandler_read_locked_graph(uint32_t this_arg) {
        LDKNetGraphMsgHandler this_arg_conv;
        this_arg_conv.inner = (void*)(this_arg & (~1));
@@ -14985,20 +17860,6 @@ void  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_free(uint
        DirectionalChannelInfo_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_clone(uint32_t orig) {
-       LDKDirectionalChannelInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_get_last_update(uint32_t this_ptr) {
        LDKDirectionalChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15109,29 +17970,38 @@ void  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_set_last_
        DirectionalChannelInfo_set_last_update_message(&this_ptr_conv, val_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_clone(uint32_t orig) {
+       LDKDirectionalChannelInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_write(uint32_t obj) {
        LDKDirectionalChannelInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = DirectionalChannelInfo_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = DirectionalChannelInfo_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_DirectionalChannelInfo_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKDirectionalChannelInfo ret_var = DirectionalChannelInfo_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_DirectionalChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_DirectionalChannelInfoDecodeErrorZ), "LDKCResult_DirectionalChannelInfoDecodeErrorZ");
+       *ret_conv = DirectionalChannelInfo_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelInfo_free(uint32_t this_ptr) {
@@ -15162,7 +18032,7 @@ void  __attribute__((visibility("default"))) TS_ChannelInfo_set_features(uint32_
        LDKChannelFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKChannelFeatures
+       val_conv = ChannelFeatures_clone(&val_conv);
        ChannelInfo_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -15170,9 +18040,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelInfo_get_node_one(
        LDKChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelInfo_get_node_one(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelInfo_get_node_one(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelInfo_set_node_one(uint32_t this_ptr, int8_tArray val) {
@@ -15214,9 +18084,9 @@ int8_tArray  __attribute__((visibility("default"))) TS_ChannelInfo_get_node_two(
        LDKChannelInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
        this_ptr_conv.is_owned = false;
-       int8_tArray arg_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), ChannelInfo_get_node_two(&this_ptr_conv).compressed_form, 33);
-       return arg_arr;
+       int8_tArray ret_arr = init_arr(33, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ChannelInfo_get_node_two(&this_ptr_conv).compressed_form, 33);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_ChannelInfo_set_node_two(uint32_t this_ptr, int8_tArray val) {
@@ -15279,29 +18149,38 @@ void  __attribute__((visibility("default"))) TS_ChannelInfo_set_announcement_mes
        ChannelInfo_set_announcement_message(&this_ptr_conv, val_conv);
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_ChannelInfo_clone(uint32_t orig) {
+       LDKChannelInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKChannelInfo ret_var = ChannelInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_ChannelInfo_write(uint32_t obj) {
        LDKChannelInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = ChannelInfo_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = ChannelInfo_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_ChannelInfo_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
        ser_ref.data = (int8_t*)(ser + 4);
-       LDKChannelInfo ret_var = ChannelInfo_read(ser_ref);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
+       LDKCResult_ChannelInfoDecodeErrorZ* ret_conv = MALLOC(sizeof(LDKCResult_ChannelInfoDecodeErrorZ), "LDKCResult_ChannelInfoDecodeErrorZ");
+       *ret_conv = ChannelInfo_read(ser_ref);
+       return (long)ret_conv;
 }
 
 void  __attribute__((visibility("default"))) TS_RoutingFees_free(uint32_t this_ptr) {
@@ -15311,20 +18190,6 @@ void  __attribute__((visibility("default"))) TS_RoutingFees_free(uint32_t this_p
        RoutingFees_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_RoutingFees_clone(uint32_t orig) {
-       LDKRoutingFees orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKRoutingFees ret_var = RoutingFees_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 int32_t  __attribute__((visibility("default"))) TS_RoutingFees_get_base_msat(uint32_t this_ptr) {
        LDKRoutingFees this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15366,6 +18231,20 @@ uint32_t  __attribute__((visibility("default"))) TS_RoutingFees_new(int32_t base
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_RoutingFees_clone(uint32_t orig) {
+       LDKRoutingFees orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKRoutingFees ret_var = RoutingFees_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 uint32_t  __attribute__((visibility("default"))) TS_RoutingFees_read(int8_tArray ser) {
        LDKu8slice ser_ref;
        ser_ref.datalen = *((uint32_t*)ser);
@@ -15379,11 +18258,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_RoutingFees_write(uint32_
        LDKRoutingFees obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = RoutingFees_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = RoutingFees_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 void  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_free(uint32_t this_ptr) {
@@ -15393,20 +18272,6 @@ void  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_free(uint32
        NodeAnnouncementInfo_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_clone(uint32_t orig) {
-       LDKNodeAnnouncementInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKNodeAnnouncementInfo ret_var = NodeAnnouncementInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_get_features(uint32_t this_ptr) {
        LDKNodeAnnouncementInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15428,7 +18293,7 @@ void  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_set_feature
        LDKNodeFeatures val_conv;
        val_conv.inner = (void*)(val & (~1));
        val_conv.is_owned = (val & 1) || (val == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       val_conv = NodeFeatures_clone(&val_conv);
        NodeAnnouncementInfo_set_features(&this_ptr_conv, val_conv);
 }
 
@@ -15497,10 +18362,10 @@ void  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_set_address
                val_constr.data = NULL;
        uint32_t* val_vals = (uint32_t*)(val + 4);
        for (size_t m = 0; m < val_constr.datalen; m++) {
-               uint32_t arr_conv_12 = val_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               val_constr.data[m] = arr_conv_12_conv;
+               uint32_t val_conv_12 = val_vals[m];
+               LDKNetAddress val_conv_12_conv = *(LDKNetAddress*)(((uint64_t)val_conv_12) & ~1);
+               FREE((void*)val_conv_12);
+               val_constr.data[m] = val_conv_12_conv;
        }
        NodeAnnouncementInfo_set_addresses(&this_ptr_conv, val_constr);
 }
@@ -15534,7 +18399,7 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_new(uin
        LDKNodeFeatures features_arg_conv;
        features_arg_conv.inner = (void*)(features_arg & (~1));
        features_arg_conv.is_owned = (features_arg & 1) || (features_arg == 0);
-       // Warning: we need a move here but no clone is available for LDKNodeFeatures
+       features_arg_conv = NodeFeatures_clone(&features_arg_conv);
        LDKThreeBytes rgb_arg_ref;
        CHECK(*((uint32_t*)rgb_arg) == 3);
        memcpy(rgb_arg_ref.data, (uint8_t*)(rgb_arg + 4), 3);
@@ -15549,10 +18414,10 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_new(uin
                addresses_arg_constr.data = NULL;
        uint32_t* addresses_arg_vals = (uint32_t*)(addresses_arg + 4);
        for (size_t m = 0; m < addresses_arg_constr.datalen; m++) {
-               uint32_t arr_conv_12 = addresses_arg_vals[m];
-               LDKNetAddress arr_conv_12_conv = *(LDKNetAddress*)(((uint64_t)arr_conv_12) & ~1);
-               FREE((void*)arr_conv_12);
-               addresses_arg_constr.data[m] = arr_conv_12_conv;
+               uint32_t addresses_arg_conv_12 = addresses_arg_vals[m];
+               LDKNetAddress addresses_arg_conv_12_conv = *(LDKNetAddress*)(((uint64_t)addresses_arg_conv_12) & ~1);
+               FREE((void*)addresses_arg_conv_12);
+               addresses_arg_constr.data[m] = addresses_arg_conv_12_conv;
        }
        LDKNodeAnnouncement announcement_message_arg_conv;
        announcement_message_arg_conv.inner = (void*)(announcement_message_arg & (~1));
@@ -15568,15 +18433,29 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_new(uin
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_clone(uint32_t orig) {
+       LDKNodeAnnouncementInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeAnnouncementInfo ret_var = NodeAnnouncementInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_write(uint32_t obj) {
        LDKNodeAnnouncementInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NodeAnnouncementInfo_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = NodeAnnouncementInfo_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_NodeAnnouncementInfo_read(int8_tArray ser) {
@@ -15595,20 +18474,6 @@ void  __attribute__((visibility("default"))) TS_NodeInfo_free(uint32_t this_ptr)
        NodeInfo_free(this_ptr_conv);
 }
 
-uint32_t  __attribute__((visibility("default"))) TS_NodeInfo_clone(uint32_t orig) {
-       LDKNodeInfo orig_conv;
-       orig_conv.inner = (void*)(orig & (~1));
-       orig_conv.is_owned = false;
-       LDKNodeInfo ret_var = NodeInfo_clone(&orig_conv);
-       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
-       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
-       long ret_ref = (long)ret_var.inner;
-       if (ret_var.is_owned) {
-               ret_ref |= 1;
-       }
-       return ret_ref;
-}
-
 void  __attribute__((visibility("default"))) TS_NodeInfo_set_channels(uint32_t this_ptr, int64_tArray val) {
        LDKNodeInfo this_ptr_conv;
        this_ptr_conv.inner = (void*)(this_ptr & (~1));
@@ -15621,8 +18486,8 @@ void  __attribute__((visibility("default"))) TS_NodeInfo_set_channels(uint32_t t
                val_constr.data = NULL;
        int64_t* val_vals = (int64_t*)(val + 4);
        for (size_t i = 0; i < val_constr.datalen; i++) {
-               int64_t arr_conv_8 = val_vals[i];
-               val_constr.data[i] = arr_conv_8;
+               int64_t val_conv_8 = val_vals[i];
+               val_constr.data[i] = val_conv_8;
        }
        NodeInfo_set_channels(&this_ptr_conv, val_constr);
 }
@@ -15686,8 +18551,8 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeInfo_new(int64_tArray ch
                channels_arg_constr.data = NULL;
        int64_t* channels_arg_vals = (int64_t*)(channels_arg + 4);
        for (size_t i = 0; i < channels_arg_constr.datalen; i++) {
-               int64_t arr_conv_8 = channels_arg_vals[i];
-               channels_arg_constr.data[i] = arr_conv_8;
+               int64_t channels_arg_conv_8 = channels_arg_vals[i];
+               channels_arg_constr.data[i] = channels_arg_conv_8;
        }
        LDKRoutingFees lowest_inbound_channel_fees_arg_conv;
        lowest_inbound_channel_fees_arg_conv.inner = (void*)(lowest_inbound_channel_fees_arg & (~1));
@@ -15707,15 +18572,29 @@ uint32_t  __attribute__((visibility("default"))) TS_NodeInfo_new(int64_tArray ch
        return ret_ref;
 }
 
+uint32_t  __attribute__((visibility("default"))) TS_NodeInfo_clone(uint32_t orig) {
+       LDKNodeInfo orig_conv;
+       orig_conv.inner = (void*)(orig & (~1));
+       orig_conv.is_owned = false;
+       LDKNodeInfo ret_var = NodeInfo_clone(&orig_conv);
+       CHECK((((long)ret_var.inner) & 1) == 0); // We rely on a free low bit, malloc guarantees this.
+       CHECK((((long)&ret_var) & 1) == 0); // We rely on a free low bit, pointer alignment guarantees this.
+       long ret_ref = (long)ret_var.inner;
+       if (ret_var.is_owned) {
+               ret_ref |= 1;
+       }
+       return ret_ref;
+}
+
 int8_tArray  __attribute__((visibility("default"))) TS_NodeInfo_write(uint32_t obj) {
        LDKNodeInfo obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NodeInfo_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = NodeInfo_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_NodeInfo_read(int8_tArray ser) {
@@ -15731,11 +18610,11 @@ int8_tArray  __attribute__((visibility("default"))) TS_NetworkGraph_write(uint32
        LDKNetworkGraph obj_conv;
        obj_conv.inner = (void*)(obj & (~1));
        obj_conv.is_owned = false;
-       LDKCVec_u8Z arg_var = NetworkGraph_write(&obj_conv);
-       int8_tArray arg_arr = init_arr(arg_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
-       memcpy((uint8_t*)(arg_arr + 4), arg_var.data, arg_var.datalen);
-       CVec_u8Z_free(arg_var);
-       return arg_arr;
+       LDKCVec_u8Z ret_var = NetworkGraph_write(&obj_conv);
+       int8_tArray ret_arr = init_arr(ret_var.datalen, sizeof(uint8_t), "Native int8_tArray Bytes");
+       memcpy((uint8_t*)(ret_arr + 4), ret_var.data, ret_var.datalen);
+       CVec_u8Z_free(ret_var);
+       return ret_arr;
 }
 
 uint32_t  __attribute__((visibility("default"))) TS_NetworkGraph_read(int8_tArray ser) {
index d5c6475b1f73e9cdb3183f695c251da792e26af7..ed4a3fdfb1a1101a1d944099fc66d433b55460f8 100644 (file)
@@ -152,36 +152,45 @@ public static native long new_empty_slice_vec();
 */
 
        public static native long LDKCVec_u8Z_new(number[] elems);
-       public static native long LDKC2Tuple_u64u64Z_new(number a, number b);
-       public static native number LDKC2Tuple_u64u64Z_get_a(long ptr);
-       public static native number LDKC2Tuple_u64u64Z_get_b(long ptr);
-       public static class LDKSpendableOutputDescriptor {
-               private LDKSpendableOutputDescriptor() {}
-               export class StaticOutput extends LDKSpendableOutputDescriptor {
-                       public number outpoint;
-                       public number output;
-                       StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
-               }
-               export class DynamicOutputP2WSH extends LDKSpendableOutputDescriptor {
-                       public number outpoint;
-                       public Uint8Array per_commitment_point;
-                       public number to_self_delay;
-                       public number output;
-                       public number key_derivation_params;
-                       public Uint8Array revocation_pubkey;
-                       DynamicOutputP2WSH(number outpoint, Uint8Array per_commitment_point, number to_self_delay, number output, number key_derivation_params, Uint8Array revocation_pubkey) { this.outpoint = outpoint; this.per_commitment_point = per_commitment_point; this.to_self_delay = to_self_delay; this.output = output; this.key_derivation_params = key_derivation_params; this.revocation_pubkey = revocation_pubkey; }
-               }
-               export class StaticOutputCounterpartyPayment extends LDKSpendableOutputDescriptor {
-                       public number outpoint;
-                       public number output;
-                       public number key_derivation_params;
-                       StaticOutputCounterpartyPayment(number outpoint, number output, number key_derivation_params) { this.outpoint = outpoint; this.output = output; this.key_derivation_params = key_derivation_params; }
-               }
-               static native void init();
-       }
-       static { LDKSpendableOutputDescriptor.init(); }
-       public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
-       public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
+       public static native boolean LDKCResult_SecretKeyErrorZ_result_ok(long arg);
+       public static native Uint8Array LDKCResult_SecretKeyErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_SecretKeyErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_PublicKeyErrorZ_result_ok(long arg);
+       public static native Uint8Array LDKCResult_PublicKeyErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_PublicKeyErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_TxCreationKeysDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TxCreationKeysErrorZ_result_ok(long arg);
+       public static native number LDKCResult_TxCreationKeysErrorZ_get_ok(long arg);
+       public static native LDKSecp256k1Error LDKCResult_TxCreationKeysErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
+       public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
+       public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
+       public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
+       public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
+       public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
        public static class LDKErrorAction {
                private LDKErrorAction() {}
                export class DisconnectPeer extends LDKErrorAction {
@@ -313,6 +322,125 @@ public static native long new_empty_slice_vec();
        static { LDKMessageSendEvent.init(); }
        public static native LDKMessageSendEvent LDKMessageSendEvent_ref_from_ptr(long ptr);
        public static native long LDKCVec_MessageSendEventZ_new(number[] elems);
+       public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
+       public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
+       public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
+       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
+       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
+       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
+       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
+       public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
+       public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
+       public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
+       public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
+       public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
+       public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
+       public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
+       public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
+       public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_InitFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_InitFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NodeFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelConfigDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelConfigDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelInfoDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelInfoDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
+       public static class LDKNetAddress {
+               private LDKNetAddress() {}
+               export class IPv4 extends LDKNetAddress {
+                       public Uint8Array addr;
+                       public number port;
+                       IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
+               }
+               export class IPv6 extends LDKNetAddress {
+                       public Uint8Array addr;
+                       public number port;
+                       IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
+               }
+               export class OnionV2 extends LDKNetAddress {
+                       public Uint8Array addr;
+                       public number port;
+                       OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
+               }
+               export class OnionV3 extends LDKNetAddress {
+                       public Uint8Array ed25519_pubkey;
+                       public number checksum;
+                       public number version;
+                       public number port;
+                       OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
+               }
+               static native void init();
+       }
+       static { LDKNetAddress.init(); }
+       public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
+       public static native long LDKCVec_NetAddressZ_new(number[] elems);
+       public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_u64Z_new(number[] elems);
+       public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
+       public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
+       public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
+       public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
+       public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
+       public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
+       public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
+       public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
+       public static class LDKMonitorEvent {
+               private LDKMonitorEvent() {}
+               export class HTLCEvent extends LDKMonitorEvent {
+                       HTLCEvent() { }
+               }
+               export class CommitmentTxBroadcasted extends LDKMonitorEvent {
+                       CommitmentTxBroadcasted() { }
+               }
+               static native void init();
+       }
+       static { LDKMonitorEvent.init(); }
+       public static native LDKMonitorEvent LDKMonitorEvent_ref_from_ptr(long ptr);
+       public static native long LDKCVec_MonitorEventZ_new(number[] elems);
+       public static class LDKSpendableOutputDescriptor {
+               private LDKSpendableOutputDescriptor() {}
+               export class StaticOutput extends LDKSpendableOutputDescriptor {
+                       public number outpoint;
+                       public number output;
+                       StaticOutput(number outpoint, number output) { this.outpoint = outpoint; this.output = output; }
+               }
+               export class DelayedPaymentOutput extends LDKSpendableOutputDescriptor {
+                       DelayedPaymentOutput() { }
+               }
+               export class StaticPaymentOutput extends LDKSpendableOutputDescriptor {
+                       StaticPaymentOutput() { }
+               }
+               static native void init();
+       }
+       static { LDKSpendableOutputDescriptor.init(); }
+       public static native LDKSpendableOutputDescriptor LDKSpendableOutputDescriptor_ref_from_ptr(long ptr);
+       public static native long LDKCVec_SpendableOutputDescriptorZ_new(number[] elems);
        public static class LDKEvent {
                private LDKEvent() {}
                export class FundingGenerationReady extends LDKEvent {
@@ -355,17 +483,15 @@ public static native long new_empty_slice_vec();
        static { LDKEvent.init(); }
        public static native LDKEvent LDKEvent_ref_from_ptr(long ptr);
        public static native long LDKCVec_EventZ_new(number[] elems);
-       public static native long LDKC2Tuple_usizeTransactionZ_new(number a, Uint8Array b);
-       public static native number LDKC2Tuple_usizeTransactionZ_get_a(long ptr);
-       public static native Uint8Array LDKC2Tuple_usizeTransactionZ_get_b(long ptr);
-       public static native long LDKCVec_C2Tuple_usizeTransactionZZ_new(number[] elems);
-       public static native boolean LDKCResult_NoneChannelMonitorUpdateErrZ_result_ok(long arg);
-       public static native void LDKCResult_NoneChannelMonitorUpdateErrZ_get_ok(long arg);
-       public static native LDKChannelMonitorUpdateErr LDKCResult_NoneChannelMonitorUpdateErrZ_get_err(long arg);
-       public static native long LDKCVec_MonitorEventZ_new(number[] elems);
+       public static native boolean LDKCResult_OutPointDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_OutPointDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_OutPointDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ChannelMonitorUpdateDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_ChannelMonitorUpdateDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_HTLCUpdateDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_NoneMonitorUpdateErrorZ_result_ok(long arg);
        public static native void LDKCResult_NoneMonitorUpdateErrorZ_get_ok(long arg);
        public static native number LDKCResult_NoneMonitorUpdateErrorZ_get_err(long arg);
@@ -394,10 +520,10 @@ public static native long new_empty_slice_vec();
 
 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
 
-               export interface LDKChannelKeys {
+               export interface LDKSign {
                        get_per_commitment_point (idx: number): Uint8Array;
                        release_commitment_secret (idx: number): Uint8Array;
-                       key_derivation_params (): number;
+                       channel_keys_id (): Uint8Array;
                        sign_counterparty_commitment (commitment_tx: number): number;
                        sign_holder_commitment_and_htlcs (commitment_tx: number): number;
                        sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number;
@@ -408,107 +534,107 @@ public static native long new_empty_slice_vec();
                        write (): Uint8Array;
                }
 
-               export function LDKChannelKeys_new(impl: LDKChannelKeys, pubkeys: number): number {
+               export function LDKSign_new(impl: LDKSign, pubkeys: number): number {
             throw new Error('unimplemented'); // TODO: bind to WASM
         }
 
 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
 
 
-       // LDKPublicKey ChannelKeys_get_per_commitment_point LDKChannelKeys* this_arg, uint64_t idx
-       export function ChannelKeys_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
+       // LDKPublicKey Sign_get_per_commitment_point LDKSign* this_arg, uint64_t idx
+       export function Sign_get_per_commitment_point(this_arg: number, idx: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_get_per_commitment_point(this_arg, idx);
+               const nativeResponseValue = wasm.Sign_get_per_commitment_point(this_arg, idx);
                return decodeArray(nativeResponseValue);
        }
-       // LDKThirtyTwoBytes ChannelKeys_release_commitment_secret LDKChannelKeys* this_arg, uint64_t idx
-       export function ChannelKeys_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
+       // LDKThirtyTwoBytes Sign_release_commitment_secret LDKSign* this_arg, uint64_t idx
+       export function Sign_release_commitment_secret(this_arg: number, idx: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_release_commitment_secret(this_arg, idx);
+               const nativeResponseValue = wasm.Sign_release_commitment_secret(this_arg, idx);
                return decodeArray(nativeResponseValue);
        }
-       // LDKC2Tuple_u64u64Z ChannelKeys_key_derivation_params LDKChannelKeys* this_arg
-       export function ChannelKeys_key_derivation_params(this_arg: number): number {
+       // LDKThirtyTwoBytes Sign_channel_keys_id LDKSign* this_arg
+       export function Sign_channel_keys_id(this_arg: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_key_derivation_params(this_arg);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.Sign_channel_keys_id(this_arg);
+               return decodeArray(nativeResponseValue);
        }
-       // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ChannelKeys_sign_counterparty_commitment LDKChannelKeys* this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
-       export function ChannelKeys_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
+       // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_counterparty_commitment LDKSign* this_arg, const struct LDKCommitmentTransaction *NONNULL_PTR commitment_tx
+       export function Sign_sign_counterparty_commitment(this_arg: number, commitment_tx: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_sign_counterparty_commitment(this_arg, commitment_tx);
+               const nativeResponseValue = wasm.Sign_sign_counterparty_commitment(this_arg, commitment_tx);
                return nativeResponseValue;
        }
-       // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ ChannelKeys_sign_holder_commitment_and_htlcs LDKChannelKeys* this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
-       export function ChannelKeys_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
+       // LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ Sign_sign_holder_commitment_and_htlcs LDKSign* this_arg, const struct LDKHolderCommitmentTransaction *NONNULL_PTR commitment_tx
+       export function Sign_sign_holder_commitment_and_htlcs(this_arg: number, commitment_tx: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
+               const nativeResponseValue = wasm.Sign_sign_holder_commitment_and_htlcs(this_arg, commitment_tx);
                return nativeResponseValue;
        }
-       // LDKCResult_SignatureNoneZ ChannelKeys_sign_justice_transaction LDKChannelKeys* this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
-       export function ChannelKeys_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
+       // LDKCResult_SignatureNoneZ Sign_sign_justice_transaction LDKSign* this_arg, struct LDKTransaction justice_tx, uintptr_t input, uint64_t amount, const uint8_t (*per_commitment_key)[32], const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
+       export function Sign_sign_justice_transaction(this_arg: number, justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
+               const nativeResponseValue = wasm.Sign_sign_justice_transaction(this_arg, encodeArray(justice_tx), input, amount, encodeArray(per_commitment_key), htlc);
                return nativeResponseValue;
        }
-       // LDKCResult_SignatureNoneZ ChannelKeys_sign_counterparty_htlc_transaction LDKChannelKeys* this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
-       export function ChannelKeys_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
+       // LDKCResult_SignatureNoneZ Sign_sign_counterparty_htlc_transaction LDKSign* this_arg, struct LDKTransaction htlc_tx, uintptr_t input, uint64_t amount, struct LDKPublicKey per_commitment_point, const struct LDKHTLCOutputInCommitment *NONNULL_PTR htlc
+       export function Sign_sign_counterparty_htlc_transaction(this_arg: number, htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
+               const nativeResponseValue = wasm.Sign_sign_counterparty_htlc_transaction(this_arg, encodeArray(htlc_tx), input, amount, encodeArray(per_commitment_point), htlc);
                return nativeResponseValue;
        }
-       // LDKCResult_SignatureNoneZ ChannelKeys_sign_closing_transaction LDKChannelKeys* this_arg, struct LDKTransaction closing_tx
-       export function ChannelKeys_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
+       // LDKCResult_SignatureNoneZ Sign_sign_closing_transaction LDKSign* this_arg, struct LDKTransaction closing_tx
+       export function Sign_sign_closing_transaction(this_arg: number, closing_tx: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_sign_closing_transaction(this_arg, encodeArray(closing_tx));
+               const nativeResponseValue = wasm.Sign_sign_closing_transaction(this_arg, encodeArray(closing_tx));
                return nativeResponseValue;
        }
-       // LDKCResult_SignatureNoneZ ChannelKeys_sign_channel_announcement LDKChannelKeys* this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
-       export function ChannelKeys_sign_channel_announcement(this_arg: number, msg: number): number {
+       // LDKCResult_SignatureNoneZ Sign_sign_channel_announcement LDKSign* this_arg, const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR msg
+       export function Sign_sign_channel_announcement(this_arg: number, msg: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_sign_channel_announcement(this_arg, msg);
+               const nativeResponseValue = wasm.Sign_sign_channel_announcement(this_arg, msg);
                return nativeResponseValue;
        }
-       // void ChannelKeys_ready_channel LDKChannelKeys* this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
-       export function ChannelKeys_ready_channel(this_arg: number, channel_parameters: number): void {
+       // void Sign_ready_channel LDKSign* this_arg, const struct LDKChannelTransactionParameters *NONNULL_PTR channel_parameters
+       export function Sign_ready_channel(this_arg: number, channel_parameters: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_ready_channel(this_arg, channel_parameters);
+               const nativeResponseValue = wasm.Sign_ready_channel(this_arg, channel_parameters);
                // debug statements here
        }
-       // LDKCVec_u8Z ChannelKeys_write LDKChannelKeys* this_arg
-       export function ChannelKeys_write(this_arg: number): Uint8Array {
+       // LDKCVec_u8Z Sign_write LDKSign* this_arg
+       export function Sign_write(this_arg: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_write(this_arg);
+               const nativeResponseValue = wasm.Sign_write(this_arg);
                return decodeArray(nativeResponseValue);
        }
-       // LDKChannelPublicKeys ChannelKeys_get_pubkeys LDKChannelKeys* this_arg
-       export function ChannelKeys_get_pubkeys(this_arg: number): number {
+       // LDKChannelPublicKeys Sign_get_pubkeys LDKSign* this_arg
+       export function Sign_get_pubkeys(this_arg: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_get_pubkeys(this_arg);
+               const nativeResponseValue = wasm.Sign_get_pubkeys(this_arg);
                return nativeResponseValue;
        }
        public static native long LDKC2Tuple_BlockHashChannelMonitorZ_new(Uint8Array a, number b);
@@ -517,15 +643,6 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_ChanKeySignerDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_TxOutAccessErrorZ_result_ok(long arg);
        public static native number LDKCResult_TxOutAccessErrorZ_get_ok(long arg);
        public static native LDKAccessError LDKCResult_TxOutAccessErrorZ_get_err(long arg);
@@ -558,39 +675,30 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_NoneAPIErrorZ_result_ok(long arg);
        public static native void LDKCResult_NoneAPIErrorZ_get_ok(long arg);
        public static native number LDKCResult_NoneAPIErrorZ_get_err(long arg);
+       public static native long LDKCVec_CResult_NoneAPIErrorZZ_new(number[] elems);
+       public static native long LDKCVec_APIErrorZ_new(number[] elems);
        public static native long LDKCVec_ChannelDetailsZ_new(number[] elems);
-       public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
-       public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
-       public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
-       public static class LDKNetAddress {
-               private LDKNetAddress() {}
-               export class IPv4 extends LDKNetAddress {
-                       public Uint8Array addr;
-                       public number port;
-                       IPv4(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
+       public static class LDKPaymentSendFailure {
+               private LDKPaymentSendFailure() {}
+               export class ParameterError extends LDKPaymentSendFailure {
+                       ParameterError() { }
                }
-               export class IPv6 extends LDKNetAddress {
-                       public Uint8Array addr;
-                       public number port;
-                       IPv6(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
+               export class PathParameterError extends LDKPaymentSendFailure {
+                       PathParameterError() { }
                }
-               export class OnionV2 extends LDKNetAddress {
-                       public Uint8Array addr;
-                       public number port;
-                       OnionV2(Uint8Array addr, number port) { this.addr = addr; this.port = port; }
+               export class AllFailedRetrySafe extends LDKPaymentSendFailure {
+                       AllFailedRetrySafe() { }
                }
-               export class OnionV3 extends LDKNetAddress {
-                       public Uint8Array ed25519_pubkey;
-                       public number checksum;
-                       public number version;
-                       public number port;
-                       OnionV3(Uint8Array ed25519_pubkey, number checksum, number version, number port) { this.ed25519_pubkey = ed25519_pubkey; this.checksum = checksum; this.version = version; this.port = port; }
+               export class PartialFailure extends LDKPaymentSendFailure {
+                       PartialFailure() { }
                }
                static native void init();
        }
-       static { LDKNetAddress.init(); }
-       public static native LDKNetAddress LDKNetAddress_ref_from_ptr(long ptr);
-       public static native long LDKCVec_NetAddressZ_new(number[] elems);
+       static { LDKPaymentSendFailure.init(); }
+       public static native LDKPaymentSendFailure LDKPaymentSendFailure_ref_from_ptr(long ptr);
+       public static native boolean LDKCResult_NonePaymentSendFailureZ_result_ok(long arg);
+       public static native void LDKCResult_NonePaymentSendFailureZ_get_ok(long arg);
+       public static native number LDKCResult_NonePaymentSendFailureZ_get_err(long arg);
        public static native long LDKCVec_ChannelMonitorZ_new(number[] elems);
 
 
@@ -658,6 +766,9 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.BroadcasterInterface_broadcast_transaction(this_arg, encodeArray(tx));
                // debug statements here
        }
+       public static native boolean LDKCResult_SignDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_SignDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_SignDecodeErrorZ_get_err(long arg);
 
 
 
@@ -667,7 +778,7 @@ public static native long new_empty_slice_vec();
                        get_node_secret (): Uint8Array;
                        get_destination_script (): Uint8Array;
                        get_shutdown_pubkey (): Uint8Array;
-                       get_channel_keys (inbound: boolean, channel_value_satoshis: number): number;
+                       get_channel_signer (inbound: boolean, channel_value_satoshis: number): number;
                        get_secure_random_bytes (): Uint8Array;
                        read_chan_signer (reader: Uint8Array): number;
                }
@@ -703,12 +814,12 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.KeysInterface_get_shutdown_pubkey(this_arg);
                return decodeArray(nativeResponseValue);
        }
-       // LDKChannelKeys KeysInterface_get_channel_keys LDKKeysInterface* this_arg, bool inbound, uint64_t channel_value_satoshis
-       export function KeysInterface_get_channel_keys(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
+       // LDKSign KeysInterface_get_channel_signer LDKKeysInterface* this_arg, bool inbound, uint64_t channel_value_satoshis
+       export function KeysInterface_get_channel_signer(this_arg: number, inbound: boolean, channel_value_satoshis: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.KeysInterface_get_channel_keys(this_arg, inbound, channel_value_satoshis);
+               const nativeResponseValue = wasm.KeysInterface_get_channel_signer(this_arg, inbound, channel_value_satoshis);
                return nativeResponseValue;
        }
        // LDKThirtyTwoBytes KeysInterface_get_secure_random_bytes LDKKeysInterface* this_arg
@@ -719,7 +830,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.KeysInterface_get_secure_random_bytes(this_arg);
                return decodeArray(nativeResponseValue);
        }
-       // LDKCResult_ChanKeySignerDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
+       // LDKCResult_SignDecodeErrorZ KeysInterface_read_chan_signer LDKKeysInterface* this_arg, struct LDKu8slice reader
        export function KeysInterface_read_chan_signer(this_arg: number, reader: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -773,35 +884,88 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_SpendableOutputDescriptorDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_SpendableOutputDescriptorDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(long arg);
+       public static native Uint8Array[] LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(long arg);
+       public static native void LDKCResult_CVec_CVec_u8ZZNoneZ_get_err(long arg);
+       public static native boolean LDKCResult_InMemorySignerDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_InMemorySignerDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_TxOutZ_new(number[] elems);
+       public static native boolean LDKCResult_TransactionNoneZ_result_ok(long arg);
+       public static native Uint8Array LDKCResult_TransactionNoneZ_get_ok(long arg);
+       public static native void LDKCResult_TransactionNoneZ_get_err(long arg);
+       public static native long LDKCVec_RouteHopZ_new(number[] elems);
+       public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
+       public static native long LDKCVec_RouteHintZ_new(number[] elems);
+       public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
+       public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
+       public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
        public static native boolean LDKCResult_NetAddressu8Z_result_ok(long arg);
        public static native number LDKCResult_NetAddressu8Z_get_ok(long arg);
        public static native number LDKCResult_NetAddressu8Z_get_err(long arg);
        public static native boolean LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_CResult_NetAddressu8ZDecodeErrorZ_get_err(long arg);
-       public static native long LDKCVec_u64Z_new(number[] elems);
        public static native long LDKCVec_UpdateAddHTLCZ_new(number[] elems);
        public static native long LDKCVec_UpdateFulfillHTLCZ_new(number[] elems);
        public static native long LDKCVec_UpdateFailHTLCZ_new(number[] elems);
        public static native long LDKCVec_UpdateFailMalformedHTLCZ_new(number[] elems);
-       public static native boolean LDKCResult_boolLightningErrorZ_result_ok(long arg);
-       public static native boolean LDKCResult_boolLightningErrorZ_get_ok(long arg);
-       public static native number LDKCResult_boolLightningErrorZ_get_err(long arg);
-       public static native long LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(number a, number b, number c);
-       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(long ptr);
-       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(long ptr);
-       public static native number LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(long ptr);
-       public static native long LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_new(number[] elems);
-       public static native long LDKCVec_NodeAnnouncementZ_new(number[] elems);
-       public static native boolean LDKCResult_NoneLightningErrorZ_result_ok(long arg);
-       public static native void LDKCResult_NoneLightningErrorZ_get_ok(long arg);
-       public static native number LDKCResult_NoneLightningErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_AcceptChannelDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_AcceptChannelDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ChannelReestablishDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_ChannelReestablishDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ClosingSignedDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ClosingSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_CommitmentSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingCreatedDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_FundingCreatedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingSignedDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_FundingSignedDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_FundingSignedDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_FundingLockedDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_FundingLockedDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_FundingLockedDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_InitDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_InitDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_InitDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_OpenChannelDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_OpenChannelDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_OpenChannelDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_RevokeAndACKDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ShutdownDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ShutdownDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ShutdownDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFeeDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_UpdateFeeDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_PingDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_PingDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_PingDecodeErrorZ_get_err(long arg);
@@ -811,15 +975,24 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_UnsignedChannelUpdateDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_UnsignedChannelUpdateDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_ChannelUpdateDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_ErrorMessageDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_ErrorMessageDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ_get_err(long arg);
+       public static native boolean LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(long arg);
+       public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(long arg);
+       public static native number LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(long arg);
        public static native boolean LDKCResult_QueryShortChannelIdsDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_QueryShortChannelIdsDecodeErrorZ_get_err(long arg);
@@ -835,50 +1008,6 @@ public static native long new_empty_slice_vec();
        public static native boolean LDKCResult_GossipTimestampFilterDecodeErrorZ_result_ok(long arg);
        public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_ok(long arg);
        public static native number LDKCResult_GossipTimestampFilterDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_CVec_u8ZPeerHandleErrorZ_result_ok(long arg);
-       public static native Uint8Array LDKCResult_CVec_u8ZPeerHandleErrorZ_get_ok(long arg);
-       public static native number LDKCResult_CVec_u8ZPeerHandleErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NonePeerHandleErrorZ_result_ok(long arg);
-       public static native void LDKCResult_NonePeerHandleErrorZ_get_ok(long arg);
-       public static native number LDKCResult_NonePeerHandleErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_boolPeerHandleErrorZ_result_ok(long arg);
-       public static native boolean LDKCResult_boolPeerHandleErrorZ_get_ok(long arg);
-       public static native number LDKCResult_boolPeerHandleErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_SecretKeySecpErrorZ_result_ok(long arg);
-       public static native Uint8Array LDKCResult_SecretKeySecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_SecretKeySecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_PublicKeySecpErrorZ_result_ok(long arg);
-       public static native Uint8Array LDKCResult_PublicKeySecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_PublicKeySecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_TxCreationKeysSecpErrorZ_result_ok(long arg);
-       public static native number LDKCResult_TxCreationKeysSecpErrorZ_get_ok(long arg);
-       public static native LDKSecp256k1Error LDKCResult_TxCreationKeysSecpErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_TrustedCommitmentTransactionNoneZ_result_ok(long arg);
-       public static native number LDKCResult_TrustedCommitmentTransactionNoneZ_get_ok(long arg);
-       public static native void LDKCResult_TrustedCommitmentTransactionNoneZ_get_err(long arg);
-       public static native boolean LDKCResult_CVec_SignatureZNoneZ_result_ok(long arg);
-       public static native Uint8Array[] LDKCResult_CVec_SignatureZNoneZ_get_ok(long arg);
-       public static native void LDKCResult_CVec_SignatureZNoneZ_get_err(long arg);
-       public static native long LDKCVec_RouteHopZ_new(number[] elems);
-       public static native boolean LDKCResult_RouteDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_RouteDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_RouteDecodeErrorZ_get_err(long arg);
-       public static native long LDKCVec_RouteHintZ_new(number[] elems);
-       public static native boolean LDKCResult_RouteLightningErrorZ_result_ok(long arg);
-       public static native number LDKCResult_RouteLightningErrorZ_get_ok(long arg);
-       public static native number LDKCResult_RouteLightningErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_RoutingFeesDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_RoutingFeesDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NodeAnnouncementInfoDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_NodeAnnouncementInfoDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NodeInfoDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_NodeInfoDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_NodeInfoDecodeErrorZ_get_err(long arg);
-       public static native boolean LDKCResult_NetworkGraphDecodeErrorZ_result_ok(long arg);
-       public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_ok(long arg);
-       public static native number LDKCResult_NetworkGraphDecodeErrorZ_get_err(long arg);
 
 
 
@@ -954,6 +1083,39 @@ public static native long new_empty_slice_vec();
 
 
 
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
+
+               export interface LDKListen {
+                       block_connected (block: Uint8Array, height: number): void;
+                       block_disconnected (header: Uint8Array, height: number): void;
+               }
+
+               export function LDKListen_new(impl: LDKListen): number {
+            throw new Error('unimplemented'); // TODO: bind to WASM
+        }
+
+// OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: END
+
+
+       // void Listen_block_connected LDKListen* this_arg, struct LDKu8slice block, uint32_t height
+       export function Listen_block_connected(this_arg: number, block: Uint8Array, height: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.Listen_block_connected(this_arg, encodeArray(block), height);
+               // debug statements here
+       }
+       // void Listen_block_disconnected LDKListen* this_arg, const uint8_t (*header)[80], uint32_t height
+       export function Listen_block_disconnected(this_arg: number, header: Uint8Array, height: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.Listen_block_disconnected(this_arg, encodeArray(header), height);
+               // debug statements here
+       }
+
+
+
 // OUT_TYPESCRIPT_BINDINGS :: MAP_TRAIT :: START
 
                export interface LDKFilter {
@@ -1028,7 +1190,7 @@ public static native long new_empty_slice_vec();
                        handle_funding_created (their_node_id: Uint8Array, msg: number): void;
                        handle_funding_signed (their_node_id: Uint8Array, msg: number): void;
                        handle_funding_locked (their_node_id: Uint8Array, msg: number): void;
-                       handle_shutdown (their_node_id: Uint8Array, msg: number): void;
+                       handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void;
                        handle_closing_signed (their_node_id: Uint8Array, msg: number): void;
                        handle_update_add_htlc (their_node_id: Uint8Array, msg: number): void;
                        handle_update_fulfill_htlc (their_node_id: Uint8Array, msg: number): void;
@@ -1091,12 +1253,12 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMessageHandler_handle_funding_locked(this_arg, encodeArray(their_node_id), msg);
                // debug statements here
        }
-       // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKShutdown *NONNULL_PTR msg
-       export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, msg: number): void {
+       // void ChannelMessageHandler_handle_shutdown LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKInitFeatures *NONNULL_PTR their_features, const struct LDKShutdown *NONNULL_PTR msg
+       export function ChannelMessageHandler_handle_shutdown(this_arg: number, their_node_id: Uint8Array, their_features: number, msg: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), msg);
+               const nativeResponseValue = wasm.ChannelMessageHandler_handle_shutdown(this_arg, encodeArray(their_node_id), their_features, msg);
                // debug statements here
        }
        // void ChannelMessageHandler_handle_closing_signed LDKChannelMessageHandler* this_arg, struct LDKPublicKey their_node_id, const struct LDKClosingSigned *NONNULL_PTR msg
@@ -1384,572 +1546,820 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.TxOut_clone(orig);
                return nativeResponseValue;
        }
-       // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
-       export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
+       // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_ok(struct LDKSecretKey o);
+       export function CResult_SecretKeyErrorZ_ok(o: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_ok(encodeArray(o));
+               return nativeResponseValue;
        }
-       // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
-       export function CVec_MessageSendEventZ_free(_res: number[]): void {
+       // struct LDKCResult_SecretKeyErrorZ CResult_SecretKeyErrorZ_err(enum LDKSecp256k1Error e);
+       export function CResult_SecretKeyErrorZ_err(e: LDKSecp256k1Error): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
-       export function CVec_EventZ_free(_res: number[]): void {
+       // void CResult_SecretKeyErrorZ_free(struct LDKCResult_SecretKeyErrorZ _res);
+       export function CResult_SecretKeyErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_EventZ_free(_res);
+               const nativeResponseValue = wasm.CResult_SecretKeyErrorZ_free(_res);
                // debug statements here
        }
-       // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
-       export function C2Tuple_usizeTransactionZ_free(_res: number): void {
+       // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_ok(struct LDKPublicKey o);
+       export function CResult_PublicKeyErrorZ_ok(o: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_ok(encodeArray(o));
+               return nativeResponseValue;
        }
-       // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
-       export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
+       // struct LDKCResult_PublicKeyErrorZ CResult_PublicKeyErrorZ_err(enum LDKSecp256k1Error e);
+       export function CResult_PublicKeyErrorZ_err(e: LDKSecp256k1Error): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
+               const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
-       export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
+       // void CResult_PublicKeyErrorZ_free(struct LDKCResult_PublicKeyErrorZ _res);
+       export function CResult_PublicKeyErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
+               const nativeResponseValue = wasm.CResult_PublicKeyErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
-       export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_ok(struct LDKTxCreationKeys o);
+       export function CResult_TxCreationKeysDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
+               const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
-       export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_TxCreationKeysDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
+               const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
-       export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
+       // void CResult_TxCreationKeysDecodeErrorZ_free(struct LDKCResult_TxCreationKeysDecodeErrorZ _res);
+       export function CResult_TxCreationKeysDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
+               const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
-       export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ CResult_TxCreationKeysDecodeErrorZ_clone(const struct LDKCResult_TxCreationKeysDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_TxCreationKeysDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_TxCreationKeysDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
-       export function CVec_MonitorEventZ_free(_res: number[]): void {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
-               // debug statements here
-       }
-       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
-       export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_ok(struct LDKChannelPublicKeys o);
+       export function CResult_ChannelPublicKeysDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelPublicKeysDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
-       export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
+       // void CResult_ChannelPublicKeysDecodeErrorZ_free(struct LDKCResult_ChannelPublicKeysDecodeErrorZ _res);
+       export function CResult_ChannelPublicKeysDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
-       export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ CResult_ChannelPublicKeysDecodeErrorZ_clone(const struct LDKCResult_ChannelPublicKeysDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelPublicKeysDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
+               const nativeResponseValue = wasm.CResult_ChannelPublicKeysDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
-       export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
+       // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_ok(struct LDKTxCreationKeys o);
+       export function CResult_TxCreationKeysErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
-       export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
+       // struct LDKCResult_TxCreationKeysErrorZ CResult_TxCreationKeysErrorZ_err(enum LDKSecp256k1Error e);
+       export function CResult_TxCreationKeysErrorZ_err(e: LDKSecp256k1Error): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
-       export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
+       // void CResult_TxCreationKeysErrorZ_free(struct LDKCResult_TxCreationKeysErrorZ _res);
+       export function CResult_TxCreationKeysErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_TxCreationKeysErrorZ_free(_res);
+               // debug statements here
        }
-       // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
-       export function C2Tuple_OutPointScriptZ_free(_res: number): void {
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(struct LDKHTLCOutputInCommitment o);
+       export function CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
-       export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
+               const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
-       export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
+       // void CResult_HTLCOutputInCommitmentDecodeErrorZ_free(struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ _res);
+       export function CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
+               const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
-       export function C2Tuple_u32TxOutZ_clone(orig: number): number {
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(const struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_HTLCOutputInCommitmentDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
-       export function C2Tuple_u32TxOutZ_free(_res: number): void {
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(struct LDKCounterpartyChannelTransactionParameters o);
+       export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
-       export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
+               const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
-       export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
+       // void CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ _res);
+       export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
+               const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
-       export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
-       export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_ok(struct LDKChannelTransactionParameters o);
+       export function CResult_ChannelTransactionParametersDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
+               const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
-       export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelTransactionParametersDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
-       export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
+       // void CResult_ChannelTransactionParametersDecodeErrorZ_free(struct LDKCResult_ChannelTransactionParametersDecodeErrorZ _res);
+       export function CResult_ChannelTransactionParametersDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
-       export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ CResult_ChannelTransactionParametersDecodeErrorZ_clone(const struct LDKCResult_ChannelTransactionParametersDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
+               const nativeResponseValue = wasm.CResult_ChannelTransactionParametersDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
-       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
+       // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
+       export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
+               // debug statements here
        }
-       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_ok(struct LDKHolderCommitmentTransaction o);
+       export function CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
-       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
-               // debug statements here
-       }
-       // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_clone(const struct LDKC2Tuple_u64u64Z *NONNULL_PTR orig);
-       export function C2Tuple_u64u64Z_clone(orig: number): number {
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_HolderCommitmentTransactionDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u64u64Z_clone(orig);
+               const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void C2Tuple_u64u64Z_free(struct LDKC2Tuple_u64u64Z _res);
-       export function C2Tuple_u64u64Z_free(_res: number): void {
+       // void CResult_HolderCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ _res);
+       export function CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u64u64Z_free(_res);
+               const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKC2Tuple_u64u64Z C2Tuple_u64u64Z_new(uint64_t a, uint64_t b);
-       export function C2Tuple_u64u64Z_new(a: number, b: number): number {
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ CResult_HolderCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_u64u64Z_new(a, b);
+               const nativeResponseValue = wasm.CResult_HolderCommitmentTransactionDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
-       export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(struct LDKBuiltCommitmentTransaction o);
+       export function CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
-       export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
+       // void CResult_BuiltCommitmentTransactionDecodeErrorZ_free(struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ _res);
+       export function CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
-       export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_BuiltCommitmentTransactionDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void CVec_SignatureZ_free(struct LDKCVec_SignatureZ _res);
-       export function CVec_SignatureZ_free(_res: Uint8Array[]): void {
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_ok(struct LDKCommitmentTransaction o);
+       export function CResult_CommitmentTransactionDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_SignatureZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
-       export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_CommitmentTransactionDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
-       export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
+       // void CResult_CommitmentTransactionDecodeErrorZ_free(struct LDKCResult_CommitmentTransactionDecodeErrorZ _res);
+       export function CResult_CommitmentTransactionDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
+               const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
-       export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CResult_CommitmentTransactionDecodeErrorZ_clone(const struct LDKCResult_CommitmentTransactionDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_CommitmentTransactionDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
+               const nativeResponseValue = wasm.CResult_CommitmentTransactionDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
-       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
+       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
+       export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
+               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
-       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
+       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
+       export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
+               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
                return nativeResponseValue;
        }
-       // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
-       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
+       // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
+       export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
+               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
-       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
+       export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
-       export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
+       export function CResult_CVec_SignatureZNoneZ_err(): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
+               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
                return nativeResponseValue;
        }
-       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
-       export function CResult_SignatureNoneZ_err(): number {
+       // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
+       export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
+               // debug statements here
        }
-       // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
-       export function CResult_SignatureNoneZ_free(_res: number): void {
+       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
+       export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
-       export function CResult_SignatureNoneZ_clone(orig: number): number {
+       // void CVec_MessageSendEventZ_free(struct LDKCVec_MessageSendEventZ _res);
+       export function CVec_MessageSendEventZ_free(_res: number[]): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CVec_MessageSendEventZ_free(_res);
+               // debug statements here
        }
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_ok(struct LDKChannelKeys o);
-       export function CResult_ChanKeySignerDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
+       export function CResult_boolLightningErrorZ_ok(o: boolean): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ChanKeySignerDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
+       export function CResult_boolLightningErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_ChanKeySignerDecodeErrorZ_free(struct LDKCResult_ChanKeySignerDecodeErrorZ _res);
-       export function CResult_ChanKeySignerDecodeErrorZ_free(_res: number): void {
+       // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
+       export function CResult_boolLightningErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_ChanKeySignerDecodeErrorZ CResult_ChanKeySignerDecodeErrorZ_clone(const struct LDKCResult_ChanKeySignerDecodeErrorZ *NONNULL_PTR orig);
-       export function CResult_ChanKeySignerDecodeErrorZ_clone(orig: number): number {
+       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
+       export function CResult_boolLightningErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChanKeySignerDecodeErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_ok(struct LDKInMemoryChannelKeys o);
-       export function CResult_InMemoryChannelKeysDecodeErrorZ_ok(o: number): number {
+       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(const struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ *NONNULL_PTR orig);
+       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ CResult_InMemoryChannelKeysDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_InMemoryChannelKeysDecodeErrorZ_err(e: number): number {
+       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
+       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
                return nativeResponseValue;
        }
-       // void CResult_InMemoryChannelKeysDecodeErrorZ_free(struct LDKCResult_InMemoryChannelKeysDecodeErrorZ _res);
-       export function CResult_InMemoryChannelKeysDecodeErrorZ_free(_res: number): void {
+       // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
+       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_InMemoryChannelKeysDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
-       export function CResult_TxOutAccessErrorZ_ok(o: number): number {
+       // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
+       export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
+               // debug statements here
        }
-       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
-       export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
+       // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
+       export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
+               // debug statements here
        }
-       // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
-       export function CResult_TxOutAccessErrorZ_free(_res: number): void {
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
+       export function CResult_NoneLightningErrorZ_ok(): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
+               return nativeResponseValue;
        }
-       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
-       export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
+       export function CResult_NoneLightningErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
-       export function CResult_NoneAPIErrorZ_ok(): number {
+       // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
+       export function CResult_NoneLightningErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
+               // debug statements here
        }
-       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
-       export function CResult_NoneAPIErrorZ_err(e: number): number {
+       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
+       export function CResult_NoneLightningErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
-       export function CResult_NoneAPIErrorZ_free(_res: number): void {
+       // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
+       export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
+               const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
                // debug statements here
        }
-       // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
-       export function CVec_ChannelDetailsZ_free(_res: number[]): void {
+       // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
+       export function CVec_u8Z_free(_res: Uint8Array): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
+               const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
                // debug statements here
        }
-       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
-       export function CResult_NonePaymentSendFailureZ_ok(): number {
+       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
+       export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
+               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
                return nativeResponseValue;
        }
-       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
-       export function CResult_NonePaymentSendFailureZ_err(e: number): number {
+       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
+               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
-       export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
+       // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
+       export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
+               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
-       export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
+       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
+       export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
+       export function CResult_NonePeerHandleErrorZ_ok(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       export function CResult_NonePeerHandleErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
+       export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
+       export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
+       export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
+       export function CResult_boolPeerHandleErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
+       export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
+       export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_ok(struct LDKInitFeatures o);
+       export function CResult_InitFeaturesDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_InitFeaturesDecodeErrorZ CResult_InitFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_InitFeaturesDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_InitFeaturesDecodeErrorZ_free(struct LDKCResult_InitFeaturesDecodeErrorZ _res);
+       export function CResult_InitFeaturesDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InitFeaturesDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_ok(struct LDKNodeFeatures o);
+       export function CResult_NodeFeaturesDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ CResult_NodeFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_NodeFeaturesDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NodeFeaturesDecodeErrorZ_free(struct LDKCResult_NodeFeaturesDecodeErrorZ _res);
+       export function CResult_NodeFeaturesDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeFeaturesDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_ok(struct LDKChannelFeatures o);
+       export function CResult_ChannelFeaturesDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ CResult_ChannelFeaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelFeaturesDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ChannelFeaturesDecodeErrorZ_free(struct LDKCResult_ChannelFeaturesDecodeErrorZ _res);
+       export function CResult_ChannelFeaturesDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelFeaturesDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_ok(struct LDKChannelConfig o);
+       export function CResult_ChannelConfigDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelConfigDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ChannelConfigDecodeErrorZ_free(struct LDKCResult_ChannelConfigDecodeErrorZ _res);
+       export function CResult_ChannelConfigDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_ChannelConfigDecodeErrorZ CResult_ChannelConfigDecodeErrorZ_clone(const struct LDKCResult_ChannelConfigDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelConfigDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelConfigDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_ok(struct LDKDirectionalChannelInfo o);
+       export function CResult_DirectionalChannelInfoDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_DirectionalChannelInfoDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_DirectionalChannelInfoDecodeErrorZ_free(struct LDKCResult_DirectionalChannelInfoDecodeErrorZ _res);
+       export function CResult_DirectionalChannelInfoDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ CResult_DirectionalChannelInfoDecodeErrorZ_clone(const struct LDKCResult_DirectionalChannelInfoDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_DirectionalChannelInfoDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_ok(struct LDKChannelInfo o);
+       export function CResult_ChannelInfoDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelInfoDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ChannelInfoDecodeErrorZ_free(struct LDKCResult_ChannelInfoDecodeErrorZ _res);
+       export function CResult_ChannelInfoDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_ChannelInfoDecodeErrorZ CResult_ChannelInfoDecodeErrorZ_clone(const struct LDKCResult_ChannelInfoDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelInfoDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelInfoDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
+       export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
+       export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_clone(const struct LDKCResult_RoutingFeesDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_RoutingFeesDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
        // void CVec_NetAddressZ_free(struct LDKCVec_NetAddressZ _res);
@@ -1960,270 +2370,1310 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CVec_NetAddressZ_free(_res);
                // debug statements here
        }
-       // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
-       export function CVec_ChannelMonitorZ_free(_res: number[]): void {
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
+       export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
-       export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
+       export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
+       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
+       export function CVec_u64Z_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_u64Z_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
+       export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
+       export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
+       export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
+       export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_clone(const struct LDKCResult_NetworkGraphDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_NetworkGraphDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_usizeTransactionZ C2Tuple_usizeTransactionZ_new(uintptr_t a, struct LDKTransaction b);
+       export function C2Tuple_usizeTransactionZ_new(a: number, b: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_new(a, encodeArray(b));
+               return nativeResponseValue;
+       }
+       // void C2Tuple_usizeTransactionZ_free(struct LDKC2Tuple_usizeTransactionZ _res);
+       export function C2Tuple_usizeTransactionZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_usizeTransactionZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_C2Tuple_usizeTransactionZZ_free(struct LDKCVec_C2Tuple_usizeTransactionZZ _res);
+       export function CVec_C2Tuple_usizeTransactionZZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_C2Tuple_usizeTransactionZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_ok(void);
+       export function CResult_NoneChannelMonitorUpdateErrZ_ok(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_ok();
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_err(enum LDKChannelMonitorUpdateErr e);
+       export function CResult_NoneChannelMonitorUpdateErrZ_err(e: LDKChannelMonitorUpdateErr): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NoneChannelMonitorUpdateErrZ_free(struct LDKCResult_NoneChannelMonitorUpdateErrZ _res);
+       export function CResult_NoneChannelMonitorUpdateErrZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NoneChannelMonitorUpdateErrZ CResult_NoneChannelMonitorUpdateErrZ_clone(const struct LDKCResult_NoneChannelMonitorUpdateErrZ *NONNULL_PTR orig);
+       export function CResult_NoneChannelMonitorUpdateErrZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneChannelMonitorUpdateErrZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_MonitorEventZ_free(struct LDKCVec_MonitorEventZ _res);
+       export function CVec_MonitorEventZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_MonitorEventZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_EventZ_free(struct LDKCVec_EventZ _res);
+       export function CVec_EventZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_EventZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_ok(struct LDKOutPoint o);
+       export function CResult_OutPointDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_OutPointDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_OutPointDecodeErrorZ_free(struct LDKCResult_OutPointDecodeErrorZ _res);
+       export function CResult_OutPointDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_OutPointDecodeErrorZ CResult_OutPointDecodeErrorZ_clone(const struct LDKCResult_OutPointDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_OutPointDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_OutPointDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_ok(struct LDKChannelMonitorUpdate o);
+       export function CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelMonitorUpdateDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ChannelMonitorUpdateDecodeErrorZ_free(struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ _res);
+       export function CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ CResult_ChannelMonitorUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelMonitorUpdateDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelMonitorUpdateDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_ok(struct LDKHTLCUpdate o);
+       export function CResult_HTLCUpdateDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_HTLCUpdateDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_HTLCUpdateDecodeErrorZ_free(struct LDKCResult_HTLCUpdateDecodeErrorZ _res);
+       export function CResult_HTLCUpdateDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ CResult_HTLCUpdateDecodeErrorZ_clone(const struct LDKCResult_HTLCUpdateDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_HTLCUpdateDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_HTLCUpdateDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_ok(void);
+       export function CResult_NoneMonitorUpdateErrorZ_ok(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_ok();
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_err(struct LDKMonitorUpdateError e);
+       export function CResult_NoneMonitorUpdateErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NoneMonitorUpdateErrorZ_free(struct LDKCResult_NoneMonitorUpdateErrorZ _res);
+       export function CResult_NoneMonitorUpdateErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NoneMonitorUpdateErrorZ CResult_NoneMonitorUpdateErrorZ_clone(const struct LDKCResult_NoneMonitorUpdateErrorZ *NONNULL_PTR orig);
+       export function CResult_NoneMonitorUpdateErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneMonitorUpdateErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_clone(const struct LDKC2Tuple_OutPointScriptZ *NONNULL_PTR orig);
+       export function C2Tuple_OutPointScriptZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_OutPointScriptZ C2Tuple_OutPointScriptZ_new(struct LDKOutPoint a, struct LDKCVec_u8Z b);
+       export function C2Tuple_OutPointScriptZ_new(a: number, b: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_new(a, encodeArray(b));
+               return nativeResponseValue;
+       }
+       // void C2Tuple_OutPointScriptZ_free(struct LDKC2Tuple_OutPointScriptZ _res);
+       export function C2Tuple_OutPointScriptZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_OutPointScriptZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_TransactionZ_free(struct LDKCVec_TransactionZ _res);
+       export function CVec_TransactionZ_free(_res: Uint8Array[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_TransactionZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_clone(const struct LDKC2Tuple_u32TxOutZ *NONNULL_PTR orig);
+       export function C2Tuple_u32TxOutZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_u32TxOutZ C2Tuple_u32TxOutZ_new(uint32_t a, struct LDKTxOut b);
+       export function C2Tuple_u32TxOutZ_new(a: number, b: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_new(a, b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_u32TxOutZ_free(struct LDKC2Tuple_u32TxOutZ _res);
+       export function C2Tuple_u32TxOutZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_u32TxOutZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_C2Tuple_u32TxOutZZ_free(struct LDKCVec_C2Tuple_u32TxOutZZ _res);
+       export function CVec_C2Tuple_u32TxOutZZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_C2Tuple_u32TxOutZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(struct LDKThirtyTwoBytes a, struct LDKCVec_C2Tuple_u32TxOutZZ b);
+       export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(a: Uint8Array, b: number[]): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_new(encodeArray(a), b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(struct LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ _res);
+       export function C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ _res);
+       export function CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKC2Tuple_BlockHashChannelMonitorZ C2Tuple_BlockHashChannelMonitorZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelMonitor b);
+       export function C2Tuple_BlockHashChannelMonitorZ_new(a: Uint8Array, b: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_new(encodeArray(a), b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_BlockHashChannelMonitorZ_free(struct LDKC2Tuple_BlockHashChannelMonitorZ _res);
+       export function C2Tuple_BlockHashChannelMonitorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelMonitorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelMonitorZ o);
+       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ _res);
+       export function CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelMonitorZDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_SpendableOutputDescriptorZ_free(struct LDKCVec_SpendableOutputDescriptorZ _res);
+       export function CVec_SpendableOutputDescriptorZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_SpendableOutputDescriptorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_ok(struct LDKTxOut o);
+       export function CResult_TxOutAccessErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_err(enum LDKAccessError e);
+       export function CResult_TxOutAccessErrorZ_err(e: LDKAccessError): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_TxOutAccessErrorZ_free(struct LDKCResult_TxOutAccessErrorZ _res);
+       export function CResult_TxOutAccessErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_TxOutAccessErrorZ CResult_TxOutAccessErrorZ_clone(const struct LDKCResult_TxOutAccessErrorZ *NONNULL_PTR orig);
+       export function CResult_TxOutAccessErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TxOutAccessErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_ok(void);
+       export function CResult_NoneAPIErrorZ_ok(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_ok();
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_err(struct LDKAPIError e);
+       export function CResult_NoneAPIErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NoneAPIErrorZ_free(struct LDKCResult_NoneAPIErrorZ _res);
+       export function CResult_NoneAPIErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NoneAPIErrorZ CResult_NoneAPIErrorZ_clone(const struct LDKCResult_NoneAPIErrorZ *NONNULL_PTR orig);
+       export function CResult_NoneAPIErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NoneAPIErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_CResult_NoneAPIErrorZZ_free(struct LDKCVec_CResult_NoneAPIErrorZZ _res);
+       export function CVec_CResult_NoneAPIErrorZZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_CResult_NoneAPIErrorZZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_APIErrorZ_free(struct LDKCVec_APIErrorZ _res);
+       export function CVec_APIErrorZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_APIErrorZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_ChannelDetailsZ_free(struct LDKCVec_ChannelDetailsZ _res);
+       export function CVec_ChannelDetailsZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_ChannelDetailsZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_ok(void);
+       export function CResult_NonePaymentSendFailureZ_ok(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_ok();
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_err(struct LDKPaymentSendFailure e);
+       export function CResult_NonePaymentSendFailureZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NonePaymentSendFailureZ_free(struct LDKCResult_NonePaymentSendFailureZ _res);
+       export function CResult_NonePaymentSendFailureZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NonePaymentSendFailureZ CResult_NonePaymentSendFailureZ_clone(const struct LDKCResult_NonePaymentSendFailureZ *NONNULL_PTR orig);
+       export function CResult_NonePaymentSendFailureZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NonePaymentSendFailureZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_ChannelMonitorZ_free(struct LDKCVec_ChannelMonitorZ _res);
+       export function CVec_ChannelMonitorZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_ChannelMonitorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKC2Tuple_BlockHashChannelManagerZ C2Tuple_BlockHashChannelManagerZ_new(struct LDKThirtyTwoBytes a, struct LDKChannelManager b);
        export function C2Tuple_BlockHashChannelManagerZ_new(a: Uint8Array, b: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_new(encodeArray(a), b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_BlockHashChannelManagerZ_free(struct LDKC2Tuple_BlockHashChannelManagerZ _res);
+       export function C2Tuple_BlockHashChannelManagerZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_BlockHashChannelManagerZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
+       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
+       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_ok(struct LDKSpendableOutputDescriptor o);
+       export function CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_SpendableOutputDescriptorDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_SpendableOutputDescriptorDecodeErrorZ_free(struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ _res);
+       export function CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ CResult_SpendableOutputDescriptorDecodeErrorZ_clone(const struct LDKCResult_SpendableOutputDescriptorDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SpendableOutputDescriptorDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_clone(const struct LDKC2Tuple_SignatureCVec_SignatureZZ *NONNULL_PTR orig);
+       export function C2Tuple_SignatureCVec_SignatureZZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKC2Tuple_SignatureCVec_SignatureZZ C2Tuple_SignatureCVec_SignatureZZ_new(struct LDKSignature a, struct LDKCVec_SignatureZ b);
+       export function C2Tuple_SignatureCVec_SignatureZZ_new(a: Uint8Array, b: Uint8Array[]): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_new(encodeArray(a), b);
+               return nativeResponseValue;
+       }
+       // void C2Tuple_SignatureCVec_SignatureZZ_free(struct LDKC2Tuple_SignatureCVec_SignatureZZ _res);
+       export function C2Tuple_SignatureCVec_SignatureZZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.C2Tuple_SignatureCVec_SignatureZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(struct LDKC2Tuple_SignatureCVec_SignatureZZ o);
+       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(void);
+       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_err();
+               return nativeResponseValue;
+       }
+       // void CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ _res);
+       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(const struct LDKCResult_C2Tuple_SignatureCVec_SignatureZZNoneZ *NONNULL_PTR orig);
+       export function CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_C2Tuple_SignatureCVec_SignatureZZNoneZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_ok(struct LDKSignature o);
+       export function CResult_SignatureNoneZ_ok(o: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignatureNoneZ_ok(encodeArray(o));
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_err(void);
+       export function CResult_SignatureNoneZ_err(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignatureNoneZ_err();
+               return nativeResponseValue;
+       }
+       // void CResult_SignatureNoneZ_free(struct LDKCResult_SignatureNoneZ _res);
+       export function CResult_SignatureNoneZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignatureNoneZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_SignatureNoneZ CResult_SignatureNoneZ_clone(const struct LDKCResult_SignatureNoneZ *NONNULL_PTR orig);
+       export function CResult_SignatureNoneZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignatureNoneZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_ok(struct LDKSign o);
+       export function CResult_SignDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_SignDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_SignDecodeErrorZ_free(struct LDKCResult_SignDecodeErrorZ _res);
+       export function CResult_SignDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_SignDecodeErrorZ CResult_SignDecodeErrorZ_clone(const struct LDKCResult_SignDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_SignDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_SignDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_CVec_u8ZZ_free(struct LDKCVec_CVec_u8ZZ _res);
+       export function CVec_CVec_u8ZZ_free(_res: Uint8Array[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_CVec_u8ZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_ok(struct LDKCVec_CVec_u8ZZ o);
+       export function CResult_CVec_CVec_u8ZZNoneZ_ok(o: Uint8Array[]): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_err(void);
+       export function CResult_CVec_CVec_u8ZZNoneZ_err(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_err();
+               return nativeResponseValue;
+       }
+       // void CResult_CVec_CVec_u8ZZNoneZ_free(struct LDKCResult_CVec_CVec_u8ZZNoneZ _res);
+       export function CResult_CVec_CVec_u8ZZNoneZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_CVec_CVec_u8ZZNoneZ CResult_CVec_CVec_u8ZZNoneZ_clone(const struct LDKCResult_CVec_CVec_u8ZZNoneZ *NONNULL_PTR orig);
+       export function CResult_CVec_CVec_u8ZZNoneZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_CVec_CVec_u8ZZNoneZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_ok(struct LDKInMemorySigner o);
+       export function CResult_InMemorySignerDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_InMemorySignerDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_InMemorySignerDecodeErrorZ_free(struct LDKCResult_InMemorySignerDecodeErrorZ _res);
+       export function CResult_InMemorySignerDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_InMemorySignerDecodeErrorZ CResult_InMemorySignerDecodeErrorZ_clone(const struct LDKCResult_InMemorySignerDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_InMemorySignerDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_InMemorySignerDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_TxOutZ_free(struct LDKCVec_TxOutZ _res);
+       export function CVec_TxOutZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_TxOutZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_ok(struct LDKTransaction o);
+       export function CResult_TransactionNoneZ_ok(o: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TransactionNoneZ_ok(encodeArray(o));
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_TransactionNoneZ CResult_TransactionNoneZ_err(void);
+       export function CResult_TransactionNoneZ_err(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TransactionNoneZ_err();
+               return nativeResponseValue;
+       }
+       // void CResult_TransactionNoneZ_free(struct LDKCResult_TransactionNoneZ _res);
+       export function CResult_TransactionNoneZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_TransactionNoneZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
+       export function CVec_RouteHopZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
+       export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
+       export function CResult_RouteDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_RouteDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
+       export function CResult_RouteDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_clone(const struct LDKCResult_RouteDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_RouteDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
+       export function CVec_RouteHintZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
+       export function CResult_RouteLightningErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
+       export function CResult_RouteLightningErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
+       export function CResult_RouteLightningErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_clone(const struct LDKCResult_RouteLightningErrorZ *NONNULL_PTR orig);
+       export function CResult_RouteLightningErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
+       export function CResult_NetAddressu8Z_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
+       export function CResult_NetAddressu8Z_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
+       export function CResult_NetAddressu8Z_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
+       export function CResult_NetAddressu8Z_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
+       export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
+       export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(const struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
+       export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
+       export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
+       export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
+               // debug statements here
+       }
+       // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
+       export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
+               // debug statements here
+       }
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_ok(struct LDKAcceptChannel o);
+       export function CResult_AcceptChannelDecodeErrorZ_ok(o: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(struct LDKC2Tuple_BlockHashChannelManagerZ o);
-       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_AcceptChannelDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e: number): number {
+       // void CResult_AcceptChannelDecodeErrorZ_free(struct LDKCResult_AcceptChannelDecodeErrorZ _res);
+       export function CResult_AcceptChannelDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_err(e);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_free(_res);
+               // debug statements here
        }
-       // void CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(struct LDKCResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ _res);
-       export function CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_AcceptChannelDecodeErrorZ CResult_AcceptChannelDecodeErrorZ_clone(const struct LDKCResult_AcceptChannelDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_AcceptChannelDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_C2Tuple_BlockHashChannelManagerZDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_AcceptChannelDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_ok(struct LDKNetAddress o);
-       export function CResult_NetAddressu8Z_ok(o: number): number {
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_ok(struct LDKAnnouncementSignatures o);
+       export function CResult_AnnouncementSignaturesDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NetAddressu8Z_ok(o);
+               const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_err(uint8_t e);
-       export function CResult_NetAddressu8Z_err(e: number): number {
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_AnnouncementSignaturesDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NetAddressu8Z_err(e);
+               const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NetAddressu8Z_free(struct LDKCResult_NetAddressu8Z _res);
-       export function CResult_NetAddressu8Z_free(_res: number): void {
+       // void CResult_AnnouncementSignaturesDecodeErrorZ_free(struct LDKCResult_AnnouncementSignaturesDecodeErrorZ _res);
+       export function CResult_AnnouncementSignaturesDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NetAddressu8Z_free(_res);
+               const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NetAddressu8Z CResult_NetAddressu8Z_clone(const struct LDKCResult_NetAddressu8Z *NONNULL_PTR orig);
-       export function CResult_NetAddressu8Z_clone(orig: number): number {
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ CResult_AnnouncementSignaturesDecodeErrorZ_clone(const struct LDKCResult_AnnouncementSignaturesDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NetAddressu8Z_clone(orig);
+               const nativeResponseValue = wasm.CResult_AnnouncementSignaturesDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(struct LDKCResult_NetAddressu8Z o);
-       export function CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
+       export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ CResult_CResult_NetAddressu8ZDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_CResult_NetAddressu8ZDecodeErrorZ_free(struct LDKCResult_CResult_NetAddressu8ZDecodeErrorZ _res);
-       export function CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res: number): void {
+       // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
+       export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CResult_NetAddressu8ZDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_u64Z_free(struct LDKCVec_u64Z _res);
-       export function CVec_u64Z_free(_res: number[]): void {
+       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_clone(const struct LDKCResult_ChannelReestablishDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelReestablishDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_u64Z_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // void CVec_UpdateAddHTLCZ_free(struct LDKCVec_UpdateAddHTLCZ _res);
-       export function CVec_UpdateAddHTLCZ_free(_res: number[]): void {
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_ok(struct LDKClosingSigned o);
+       export function CResult_ClosingSignedDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_UpdateAddHTLCZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // void CVec_UpdateFulfillHTLCZ_free(struct LDKCVec_UpdateFulfillHTLCZ _res);
-       export function CVec_UpdateFulfillHTLCZ_free(_res: number[]): void {
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ClosingSignedDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_UpdateFulfillHTLCZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // void CVec_UpdateFailHTLCZ_free(struct LDKCVec_UpdateFailHTLCZ _res);
-       export function CVec_UpdateFailHTLCZ_free(_res: number[]): void {
+       // void CResult_ClosingSignedDecodeErrorZ_free(struct LDKCResult_ClosingSignedDecodeErrorZ _res);
+       export function CResult_ClosingSignedDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_UpdateFailHTLCZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_UpdateFailMalformedHTLCZ_free(struct LDKCVec_UpdateFailMalformedHTLCZ _res);
-       export function CVec_UpdateFailMalformedHTLCZ_free(_res: number[]): void {
+       // struct LDKCResult_ClosingSignedDecodeErrorZ CResult_ClosingSignedDecodeErrorZ_clone(const struct LDKCResult_ClosingSignedDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ClosingSignedDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_UpdateFailMalformedHTLCZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_ClosingSignedDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_ok(bool o);
-       export function CResult_boolLightningErrorZ_ok(o: boolean): number {
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_ok(struct LDKCommitmentSigned o);
+       export function CResult_CommitmentSignedDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_err(struct LDKLightningError e);
-       export function CResult_boolLightningErrorZ_err(e: number): number {
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_CommitmentSignedDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_boolLightningErrorZ_free(struct LDKCResult_boolLightningErrorZ _res);
-       export function CResult_boolLightningErrorZ_free(_res: number): void {
+       // void CResult_CommitmentSignedDecodeErrorZ_free(struct LDKCResult_CommitmentSignedDecodeErrorZ _res);
+       export function CResult_CommitmentSignedDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_boolLightningErrorZ CResult_boolLightningErrorZ_clone(const struct LDKCResult_boolLightningErrorZ *NONNULL_PTR orig);
-       export function CResult_boolLightningErrorZ_clone(orig: number): number {
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CResult_CommitmentSignedDecodeErrorZ_clone(const struct LDKCResult_CommitmentSignedDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_CommitmentSignedDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolLightningErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_CommitmentSignedDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ _res);
-       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res: number): void {
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_ok(struct LDKFundingCreated o);
+       export function CResult_FundingCreatedDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(struct LDKChannelAnnouncement a, struct LDKChannelUpdate b, struct LDKChannelUpdate c);
-       export function C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a: number, b: number, c: number): number {
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_FundingCreatedDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(a, b, c);
+               const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(struct LDKCVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ _res);
-       export function CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res: number[]): void {
+       // void CResult_FundingCreatedDecodeErrorZ_free(struct LDKCResult_FundingCreatedDecodeErrorZ _res);
+       export function CResult_FundingCreatedDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZZ_free(_res);
+               const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_NodeAnnouncementZ_free(struct LDKCVec_NodeAnnouncementZ _res);
-       export function CVec_NodeAnnouncementZ_free(_res: number[]): void {
+       // struct LDKCResult_FundingCreatedDecodeErrorZ CResult_FundingCreatedDecodeErrorZ_clone(const struct LDKCResult_FundingCreatedDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_FundingCreatedDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_NodeAnnouncementZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_FundingCreatedDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_ok(void);
-       export function CResult_NoneLightningErrorZ_ok(): number {
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_ok(struct LDKFundingSigned o);
+       export function CResult_FundingSignedDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_ok();
+               const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_err(struct LDKLightningError e);
-       export function CResult_NoneLightningErrorZ_err(e: number): number {
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_FundingSignedDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NoneLightningErrorZ_free(struct LDKCResult_NoneLightningErrorZ _res);
-       export function CResult_NoneLightningErrorZ_free(_res: number): void {
+       // void CResult_FundingSignedDecodeErrorZ_free(struct LDKCResult_FundingSignedDecodeErrorZ _res);
+       export function CResult_FundingSignedDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NoneLightningErrorZ CResult_NoneLightningErrorZ_clone(const struct LDKCResult_NoneLightningErrorZ *NONNULL_PTR orig);
-       export function CResult_NoneLightningErrorZ_clone(orig: number): number {
+       // struct LDKCResult_FundingSignedDecodeErrorZ CResult_FundingSignedDecodeErrorZ_clone(const struct LDKCResult_FundingSignedDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_FundingSignedDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NoneLightningErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_FundingSignedDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_ok(struct LDKChannelReestablish o);
-       export function CResult_ChannelReestablishDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_ok(struct LDKFundingLocked o);
+       export function CResult_FundingLockedDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ChannelReestablishDecodeErrorZ CResult_ChannelReestablishDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ChannelReestablishDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_FundingLockedDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_ChannelReestablishDecodeErrorZ_free(struct LDKCResult_ChannelReestablishDecodeErrorZ _res);
-       export function CResult_ChannelReestablishDecodeErrorZ_free(_res: number): void {
+       // void CResult_FundingLockedDecodeErrorZ_free(struct LDKCResult_FundingLockedDecodeErrorZ _res);
+       export function CResult_FundingLockedDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ChannelReestablishDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_free(_res);
                // debug statements here
        }
+       // struct LDKCResult_FundingLockedDecodeErrorZ CResult_FundingLockedDecodeErrorZ_clone(const struct LDKCResult_FundingLockedDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_FundingLockedDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_FundingLockedDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_ok(struct LDKInit o);
        export function CResult_InitDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
@@ -2248,693 +3698,717 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
-       export function CResult_PingDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_InitDecodeErrorZ CResult_InitDecodeErrorZ_clone(const struct LDKCResult_InitDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_InitDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_InitDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_PingDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_ok(struct LDKOpenChannel o);
+       export function CResult_OpenChannelDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
-       export function CResult_PingDecodeErrorZ_free(_res: number): void {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
-               // debug statements here
-       }
-       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
-       export function CResult_PongDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_OpenChannelDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_PongDecodeErrorZ_err(e: number): number {
+       // void CResult_OpenChannelDecodeErrorZ_free(struct LDKCResult_OpenChannelDecodeErrorZ _res);
+       export function CResult_OpenChannelDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_free(_res);
+               // debug statements here
        }
-       // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
-       export function CResult_PongDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_OpenChannelDecodeErrorZ CResult_OpenChannelDecodeErrorZ_clone(const struct LDKCResult_OpenChannelDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_OpenChannelDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_OpenChannelDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
-       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_ok(struct LDKRevokeAndACK o);
+       export function CResult_RevokeAndACKDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_RevokeAndACKDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
-       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
+       // void CResult_RevokeAndACKDecodeErrorZ_free(struct LDKCResult_RevokeAndACKDecodeErrorZ _res);
+       export function CResult_RevokeAndACKDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
-       export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ CResult_RevokeAndACKDecodeErrorZ_clone(const struct LDKCResult_RevokeAndACKDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_RevokeAndACKDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_RevokeAndACKDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_ok(struct LDKShutdown o);
+       export function CResult_ShutdownDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
-       export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
-               // debug statements here
-       }
-       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
-       export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ShutdownDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
+       // void CResult_ShutdownDecodeErrorZ_free(struct LDKCResult_ShutdownDecodeErrorZ _res);
+       export function CResult_ShutdownDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_free(_res);
+               // debug statements here
        }
-       // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
-       export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_ShutdownDecodeErrorZ CResult_ShutdownDecodeErrorZ_clone(const struct LDKCResult_ShutdownDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ShutdownDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_ShutdownDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
-       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_ok(struct LDKUpdateFailHTLC o);
+       export function CResult_UpdateFailHTLCDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UpdateFailHTLCDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
-       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
+       // void CResult_UpdateFailHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailHTLCDecodeErrorZ _res);
+       export function CResult_UpdateFailHTLCDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
-       export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ CResult_UpdateFailHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailHTLCDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UpdateFailHTLCDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UpdateFailHTLCDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(struct LDKUpdateFailMalformedHTLC o);
+       export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
-       export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
-       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
+       // void CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ _res);
+       export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(_res);
+               // debug statements here
        }
-       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UpdateFailMalformedHTLCDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
-       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_ok(struct LDKUpdateFee o);
+       export function CResult_UpdateFeeDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
-       export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UpdateFeeDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
+       // void CResult_UpdateFeeDecodeErrorZ_free(struct LDKCResult_UpdateFeeDecodeErrorZ _res);
+       export function CResult_UpdateFeeDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_free(_res);
+               // debug statements here
        }
-       // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
-       export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_UpdateFeeDecodeErrorZ CResult_UpdateFeeDecodeErrorZ_clone(const struct LDKCResult_UpdateFeeDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UpdateFeeDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UpdateFeeDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
-       export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_ok(struct LDKUpdateFulfillHTLC o);
+       export function CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UpdateFulfillHTLCDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
-       export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
+       // void CResult_UpdateFulfillHTLCDecodeErrorZ_free(struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ _res);
+       export function CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
-       export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ CResult_UpdateFulfillHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UpdateFulfillHTLCDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_ok(struct LDKUpdateAddHTLC o);
+       export function CResult_UpdateAddHTLCDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
-       export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UpdateAddHTLCDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // void CVec_PublicKeyZ_free(struct LDKCVec_PublicKeyZ _res);
-       export function CVec_PublicKeyZ_free(_res: Uint8Array[]): void {
+       // void CResult_UpdateAddHTLCDecodeErrorZ_free(struct LDKCResult_UpdateAddHTLCDecodeErrorZ _res);
+       export function CResult_UpdateAddHTLCDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_PublicKeyZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_free(_res);
                // debug statements here
-       }
-       // void CVec_u8Z_free(struct LDKCVec_u8Z _res);
-       export function CVec_u8Z_free(_res: Uint8Array): void {
+       }
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ CResult_UpdateAddHTLCDecodeErrorZ_clone(const struct LDKCResult_UpdateAddHTLCDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UpdateAddHTLCDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_u8Z_free(encodeArray(_res));
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UpdateAddHTLCDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_ok(struct LDKCVec_u8Z o);
-       export function CResult_CVec_u8ZPeerHandleErrorZ_ok(o: Uint8Array): number {
+       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_ok(struct LDKPing o);
+       export function CResult_PingDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_ok(encodeArray(o));
+               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       export function CResult_CVec_u8ZPeerHandleErrorZ_err(e: number): number {
+       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_PingDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_CVec_u8ZPeerHandleErrorZ_free(struct LDKCResult_CVec_u8ZPeerHandleErrorZ _res);
-       export function CResult_CVec_u8ZPeerHandleErrorZ_free(_res: number): void {
+       // void CResult_PingDecodeErrorZ_free(struct LDKCResult_PingDecodeErrorZ _res);
+       export function CResult_PingDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_CVec_u8ZPeerHandleErrorZ CResult_CVec_u8ZPeerHandleErrorZ_clone(const struct LDKCResult_CVec_u8ZPeerHandleErrorZ *NONNULL_PTR orig);
-       export function CResult_CVec_u8ZPeerHandleErrorZ_clone(orig: number): number {
+       // struct LDKCResult_PingDecodeErrorZ CResult_PingDecodeErrorZ_clone(const struct LDKCResult_PingDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_PingDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_u8ZPeerHandleErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_PingDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_ok(void);
-       export function CResult_NonePeerHandleErrorZ_ok(): number {
+       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_ok(struct LDKPong o);
+       export function CResult_PongDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_ok();
+               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       export function CResult_NonePeerHandleErrorZ_err(e: number): number {
+       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_PongDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NonePeerHandleErrorZ_free(struct LDKCResult_NonePeerHandleErrorZ _res);
-       export function CResult_NonePeerHandleErrorZ_free(_res: number): void {
+       // void CResult_PongDecodeErrorZ_free(struct LDKCResult_PongDecodeErrorZ _res);
+       export function CResult_PongDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NonePeerHandleErrorZ CResult_NonePeerHandleErrorZ_clone(const struct LDKCResult_NonePeerHandleErrorZ *NONNULL_PTR orig);
-       export function CResult_NonePeerHandleErrorZ_clone(orig: number): number {
+       // struct LDKCResult_PongDecodeErrorZ CResult_PongDecodeErrorZ_clone(const struct LDKCResult_PongDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_PongDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NonePeerHandleErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_PongDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_ok(bool o);
-       export function CResult_boolPeerHandleErrorZ_ok(o: boolean): number {
+       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(struct LDKUnsignedChannelAnnouncement o);
+       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_err(struct LDKPeerHandleError e);
-       export function CResult_boolPeerHandleErrorZ_err(e: number): number {
+       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_boolPeerHandleErrorZ_free(struct LDKCResult_boolPeerHandleErrorZ _res);
-       export function CResult_boolPeerHandleErrorZ_free(_res: number): void {
+       // void CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ _res);
+       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_boolPeerHandleErrorZ CResult_boolPeerHandleErrorZ_clone(const struct LDKCResult_boolPeerHandleErrorZ *NONNULL_PTR orig);
-       export function CResult_boolPeerHandleErrorZ_clone(orig: number): number {
+       // struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_boolPeerHandleErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelAnnouncementDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_ok(struct LDKSecretKey o);
-       export function CResult_SecretKeySecpErrorZ_ok(o: Uint8Array): number {
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_ok(struct LDKChannelAnnouncement o);
+       export function CResult_ChannelAnnouncementDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_ok(encodeArray(o));
+               const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_SecretKeySecpErrorZ CResult_SecretKeySecpErrorZ_err(enum LDKSecp256k1Error e);
-       export function CResult_SecretKeySecpErrorZ_err(e: LDKSecp256k1Error): number {
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelAnnouncementDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_SecretKeySecpErrorZ_free(struct LDKCResult_SecretKeySecpErrorZ _res);
-       export function CResult_SecretKeySecpErrorZ_free(_res: number): void {
+       // void CResult_ChannelAnnouncementDecodeErrorZ_free(struct LDKCResult_ChannelAnnouncementDecodeErrorZ _res);
+       export function CResult_ChannelAnnouncementDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_SecretKeySecpErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_ok(struct LDKPublicKey o);
-       export function CResult_PublicKeySecpErrorZ_ok(o: Uint8Array): number {
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ CResult_ChannelAnnouncementDecodeErrorZ_clone(const struct LDKCResult_ChannelAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelAnnouncementDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ChannelAnnouncementDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_ok(struct LDKUnsignedChannelUpdate o);
+       export function CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_ok(encodeArray(o));
+               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_PublicKeySecpErrorZ CResult_PublicKeySecpErrorZ_err(enum LDKSecp256k1Error e);
-       export function CResult_PublicKeySecpErrorZ_err(e: LDKSecp256k1Error): number {
+       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UnsignedChannelUpdateDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_PublicKeySecpErrorZ_free(struct LDKCResult_PublicKeySecpErrorZ _res);
-       export function CResult_PublicKeySecpErrorZ_free(_res: number): void {
+       // void CResult_UnsignedChannelUpdateDecodeErrorZ_free(struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ _res);
+       export function CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_PublicKeySecpErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_ok(struct LDKTxCreationKeys o);
-       export function CResult_TxCreationKeysSecpErrorZ_ok(o: number): number {
+       // struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ CResult_UnsignedChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_UnsignedChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_UnsignedChannelUpdateDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_ok(struct LDKChannelUpdate o);
+       export function CResult_ChannelUpdateDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_TxCreationKeysSecpErrorZ CResult_TxCreationKeysSecpErrorZ_err(enum LDKSecp256k1Error e);
-       export function CResult_TxCreationKeysSecpErrorZ_err(e: LDKSecp256k1Error): number {
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ChannelUpdateDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_TxCreationKeysSecpErrorZ_free(struct LDKCResult_TxCreationKeysSecpErrorZ _res);
-       export function CResult_TxCreationKeysSecpErrorZ_free(_res: number): void {
+       // void CResult_ChannelUpdateDecodeErrorZ_free(struct LDKCResult_ChannelUpdateDecodeErrorZ _res);
+       export function CResult_ChannelUpdateDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TxCreationKeysSecpErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_ok(struct LDKTrustedCommitmentTransaction o);
-       export function CResult_TrustedCommitmentTransactionNoneZ_ok(o: number): number {
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ CResult_ChannelUpdateDecodeErrorZ_clone(const struct LDKCResult_ChannelUpdateDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ChannelUpdateDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ChannelUpdateDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_TrustedCommitmentTransactionNoneZ CResult_TrustedCommitmentTransactionNoneZ_err(void);
-       export function CResult_TrustedCommitmentTransactionNoneZ_err(): number {
+       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_ok(struct LDKErrorMessage o);
+       export function CResult_ErrorMessageDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_err();
+               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_TrustedCommitmentTransactionNoneZ_free(struct LDKCResult_TrustedCommitmentTransactionNoneZ _res);
-       export function CResult_TrustedCommitmentTransactionNoneZ_free(_res: number): void {
+       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ErrorMessageDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_TrustedCommitmentTransactionNoneZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_err(e);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_ok(struct LDKCVec_SignatureZ o);
-       export function CResult_CVec_SignatureZNoneZ_ok(o: Uint8Array[]): number {
+       // void CResult_ErrorMessageDecodeErrorZ_free(struct LDKCResult_ErrorMessageDecodeErrorZ _res);
+       export function CResult_ErrorMessageDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_ok(o);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_free(_res);
+               // debug statements here
        }
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_err(void);
-       export function CResult_CVec_SignatureZNoneZ_err(): number {
+       // struct LDKCResult_ErrorMessageDecodeErrorZ CResult_ErrorMessageDecodeErrorZ_clone(const struct LDKCResult_ErrorMessageDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ErrorMessageDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_err();
+               const nativeResponseValue = wasm.CResult_ErrorMessageDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // void CResult_CVec_SignatureZNoneZ_free(struct LDKCResult_CVec_SignatureZNoneZ _res);
-       export function CResult_CVec_SignatureZNoneZ_free(_res: number): void {
+       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(struct LDKUnsignedNodeAnnouncement o);
+       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_ok(o);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_CVec_SignatureZNoneZ CResult_CVec_SignatureZNoneZ_clone(const struct LDKCResult_CVec_SignatureZNoneZ *NONNULL_PTR orig);
-       export function CResult_CVec_SignatureZNoneZ_clone(orig: number): number {
+       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_CVec_SignatureZNoneZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CVec_RouteHopZ_free(struct LDKCVec_RouteHopZ _res);
-       export function CVec_RouteHopZ_free(_res: number[]): void {
+       // void CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ _res);
+       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_RouteHopZ_free(_res);
+               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_CVec_RouteHopZZ_free(struct LDKCVec_CVec_RouteHopZZ _res);
-       export function CVec_CVec_RouteHopZZ_free(_res: number[][]): void {
+       // struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_UnsignedNodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_CVec_RouteHopZZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_UnsignedNodeAnnouncementDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_ok(struct LDKRoute o);
-       export function CResult_RouteDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_ok(struct LDKNodeAnnouncement o);
+       export function CResult_NodeAnnouncementDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_RouteDecodeErrorZ CResult_RouteDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_RouteDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_NodeAnnouncementDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_RouteDecodeErrorZ_free(struct LDKCResult_RouteDecodeErrorZ _res);
-       export function CResult_RouteDecodeErrorZ_free(_res: number): void {
+       // void CResult_NodeAnnouncementDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementDecodeErrorZ _res);
+       export function CResult_NodeAnnouncementDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // void CVec_RouteHintZ_free(struct LDKCVec_RouteHintZ _res);
-       export function CVec_RouteHintZ_free(_res: number[]): void {
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ CResult_NodeAnnouncementDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_NodeAnnouncementDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CVec_RouteHintZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_NodeAnnouncementDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_ok(struct LDKRoute o);
-       export function CResult_RouteLightningErrorZ_ok(o: number): number {
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_ok(struct LDKQueryShortChannelIds o);
+       export function CResult_QueryShortChannelIdsDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_RouteLightningErrorZ CResult_RouteLightningErrorZ_err(struct LDKLightningError e);
-       export function CResult_RouteLightningErrorZ_err(e: number): number {
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_QueryShortChannelIdsDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_RouteLightningErrorZ_free(struct LDKCResult_RouteLightningErrorZ _res);
-       export function CResult_RouteLightningErrorZ_free(_res: number): void {
+       // void CResult_QueryShortChannelIdsDecodeErrorZ_free(struct LDKCResult_QueryShortChannelIdsDecodeErrorZ _res);
+       export function CResult_QueryShortChannelIdsDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RouteLightningErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_ok(struct LDKRoutingFees o);
-       export function CResult_RoutingFeesDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_QueryShortChannelIdsDecodeErrorZ CResult_QueryShortChannelIdsDecodeErrorZ_clone(const struct LDKCResult_QueryShortChannelIdsDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_QueryShortChannelIdsDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_RoutingFeesDecodeErrorZ CResult_RoutingFeesDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_RoutingFeesDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(struct LDKReplyShortChannelIdsEnd o);
+       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_RoutingFeesDecodeErrorZ_free(struct LDKCResult_RoutingFeesDecodeErrorZ _res);
-       export function CResult_RoutingFeesDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_RoutingFeesDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ _res);
+       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_ok(struct LDKNodeAnnouncementInfo o);
-       export function CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(const struct LDKCResult_ReplyShortChannelIdsEndDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ReplyShortChannelIdsEndDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_NodeAnnouncementInfoDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_ok(struct LDKQueryChannelRange o);
+       export function CResult_QueryChannelRangeDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // void CResult_NodeAnnouncementInfoDecodeErrorZ_free(struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ _res);
-       export function CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_QueryChannelRangeDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_QueryChannelRangeDecodeErrorZ_free(struct LDKCResult_QueryChannelRangeDecodeErrorZ _res);
+       export function CResult_QueryChannelRangeDecodeErrorZ_free(_res: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ CResult_NodeAnnouncementInfoDecodeErrorZ_clone(const struct LDKCResult_NodeAnnouncementInfoDecodeErrorZ *NONNULL_PTR orig);
-       export function CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig: number): number {
+       // struct LDKCResult_QueryChannelRangeDecodeErrorZ CResult_QueryChannelRangeDecodeErrorZ_clone(const struct LDKCResult_QueryChannelRangeDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_QueryChannelRangeDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeAnnouncementInfoDecodeErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_QueryChannelRangeDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_ok(struct LDKNodeInfo o);
-       export function CResult_NodeInfoDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_ok(struct LDKReplyChannelRange o);
+       export function CResult_ReplyChannelRangeDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_NodeInfoDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_ReplyChannelRangeDecodeErrorZ_err(e: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_err(e);
+               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_err(e);
                return nativeResponseValue;
        }
-       // void CResult_NodeInfoDecodeErrorZ_free(struct LDKCResult_NodeInfoDecodeErrorZ _res);
-       export function CResult_NodeInfoDecodeErrorZ_free(_res: number): void {
+       // void CResult_ReplyChannelRangeDecodeErrorZ_free(struct LDKCResult_ReplyChannelRangeDecodeErrorZ _res);
+       export function CResult_ReplyChannelRangeDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_free(_res);
+               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_free(_res);
                // debug statements here
        }
-       // struct LDKCResult_NodeInfoDecodeErrorZ CResult_NodeInfoDecodeErrorZ_clone(const struct LDKCResult_NodeInfoDecodeErrorZ *NONNULL_PTR orig);
-       export function CResult_NodeInfoDecodeErrorZ_clone(orig: number): number {
+       // struct LDKCResult_ReplyChannelRangeDecodeErrorZ CResult_ReplyChannelRangeDecodeErrorZ_clone(const struct LDKCResult_ReplyChannelRangeDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_ReplyChannelRangeDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NodeInfoDecodeErrorZ_clone(orig);
+               const nativeResponseValue = wasm.CResult_ReplyChannelRangeDecodeErrorZ_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_ok(struct LDKNetworkGraph o);
-       export function CResult_NetworkGraphDecodeErrorZ_ok(o: number): number {
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_ok(struct LDKGossipTimestampFilter o);
+       export function CResult_GossipTimestampFilterDecodeErrorZ_ok(o: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_ok(o);
+               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_ok(o);
                return nativeResponseValue;
        }
-       // struct LDKCResult_NetworkGraphDecodeErrorZ CResult_NetworkGraphDecodeErrorZ_err(struct LDKDecodeError e);
-       export function CResult_NetworkGraphDecodeErrorZ_err(e: number): number {
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_err(struct LDKDecodeError e);
+       export function CResult_GossipTimestampFilterDecodeErrorZ_err(e: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_err(e);
+               return nativeResponseValue;
+       }
+       // void CResult_GossipTimestampFilterDecodeErrorZ_free(struct LDKCResult_GossipTimestampFilterDecodeErrorZ _res);
+       export function CResult_GossipTimestampFilterDecodeErrorZ_free(_res: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_err(e);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_free(_res);
+               // debug statements here
        }
-       // void CResult_NetworkGraphDecodeErrorZ_free(struct LDKCResult_NetworkGraphDecodeErrorZ _res);
-       export function CResult_NetworkGraphDecodeErrorZ_free(_res: number): void {
+       // struct LDKCResult_GossipTimestampFilterDecodeErrorZ CResult_GossipTimestampFilterDecodeErrorZ_clone(const struct LDKCResult_GossipTimestampFilterDecodeErrorZ *NONNULL_PTR orig);
+       export function CResult_GossipTimestampFilterDecodeErrorZ_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CResult_NetworkGraphDecodeErrorZ_free(_res);
-               // debug statements here
+               const nativeResponseValue = wasm.CResult_GossipTimestampFilterDecodeErrorZ_clone(orig);
+               return nativeResponseValue;
        }
        // void Event_free(struct LDKEvent this_ptr);
        export function Event_free(this_ptr: number): void {
@@ -3040,14 +4514,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelHandshakeConfig_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
-       export function ChannelHandshakeConfig_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
-               return nativeResponseValue;
-       }
        // uint32_t ChannelHandshakeConfig_get_minimum_depth(const struct LDKChannelHandshakeConfig *NONNULL_PTR this_ptr);
        export function ChannelHandshakeConfig_get_minimum_depth(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -3104,6 +4570,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelHandshakeConfig_new(minimum_depth_arg, our_to_self_delay_arg, our_htlc_minimum_msat_arg);
                return nativeResponseValue;
        }
+       // struct LDKChannelHandshakeConfig ChannelHandshakeConfig_clone(const struct LDKChannelHandshakeConfig *NONNULL_PTR orig);
+       export function ChannelHandshakeConfig_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelHandshakeConfig_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES struct LDKChannelHandshakeConfig ChannelHandshakeConfig_default(void);
        export function ChannelHandshakeConfig_default(): number {
                if(!isWasmInitialized) {
@@ -3120,14 +4594,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelHandshakeLimits_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
-       export function ChannelHandshakeLimits_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
-               return nativeResponseValue;
-       }
        // uint64_t ChannelHandshakeLimits_get_min_funding_satoshis(const struct LDKChannelHandshakeLimits *NONNULL_PTR this_ptr);
        export function ChannelHandshakeLimits_get_min_funding_satoshis(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -3296,6 +4762,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelHandshakeLimits_new(min_funding_satoshis_arg, max_htlc_minimum_msat_arg, min_max_htlc_value_in_flight_msat_arg, max_channel_reserve_satoshis_arg, min_max_accepted_htlcs_arg, min_dust_limit_satoshis_arg, max_dust_limit_satoshis_arg, max_minimum_depth_arg, force_announced_channel_preference_arg, their_to_self_delay_arg);
                return nativeResponseValue;
        }
+       // struct LDKChannelHandshakeLimits ChannelHandshakeLimits_clone(const struct LDKChannelHandshakeLimits *NONNULL_PTR orig);
+       export function ChannelHandshakeLimits_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelHandshakeLimits_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES struct LDKChannelHandshakeLimits ChannelHandshakeLimits_default(void);
        export function ChannelHandshakeLimits_default(): number {
                if(!isWasmInitialized) {
@@ -3312,14 +4786,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelConfig_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
-       export function ChannelConfig_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelConfig_clone(orig);
-               return nativeResponseValue;
-       }
        // uint32_t ChannelConfig_get_fee_proportional_millionths(const struct LDKChannelConfig *NONNULL_PTR this_ptr);
        export function ChannelConfig_get_fee_proportional_millionths(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -3376,6 +4842,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelConfig_new(fee_proportional_millionths_arg, announced_channel_arg, commit_upfront_shutdown_pubkey_arg);
                return nativeResponseValue;
        }
+       // struct LDKChannelConfig ChannelConfig_clone(const struct LDKChannelConfig *NONNULL_PTR orig);
+       export function ChannelConfig_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelConfig_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES struct LDKChannelConfig ChannelConfig_default(void);
        export function ChannelConfig_default(): number {
                if(!isWasmInitialized) {
@@ -3392,7 +4866,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelConfig_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelConfig ChannelConfig_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelConfigDecodeErrorZ ChannelConfig_read(struct LDKu8slice ser);
        export function ChannelConfig_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3408,14 +4882,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UserConfig_free(this_ptr);
                // debug statements here
        }
-       // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
-       export function UserConfig_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.UserConfig_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKChannelHandshakeConfig UserConfig_get_own_channel_config(const struct LDKUserConfig *NONNULL_PTR this_ptr);
        export function UserConfig_get_own_channel_config(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -3472,6 +4938,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UserConfig_new(own_channel_config_arg, peer_channel_config_limits_arg, channel_options_arg);
                return nativeResponseValue;
        }
+       // struct LDKUserConfig UserConfig_clone(const struct LDKUserConfig *NONNULL_PTR orig);
+       export function UserConfig_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.UserConfig_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES struct LDKUserConfig UserConfig_default(void);
        export function UserConfig_default(): number {
                if(!isWasmInitialized) {
@@ -3496,6 +4970,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Access_free(this_ptr);
                // debug statements here
        }
+       // void Listen_free(struct LDKListen this_ptr);
+       export function Listen_free(this_ptr: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.Listen_free(this_ptr);
+               // debug statements here
+       }
        // void Watch_free(struct LDKWatch this_ptr);
        export function Watch_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -3592,14 +5074,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMonitorUpdate_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
-       export function ChannelMonitorUpdate_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
-               return nativeResponseValue;
-       }
        // uint64_t ChannelMonitorUpdate_get_update_id(const struct LDKChannelMonitorUpdate *NONNULL_PTR this_ptr);
        export function ChannelMonitorUpdate_get_update_id(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -3616,6 +5090,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMonitorUpdate_set_update_id(this_ptr, val);
                // debug statements here
        }
+       // struct LDKChannelMonitorUpdate ChannelMonitorUpdate_clone(const struct LDKChannelMonitorUpdate *NONNULL_PTR orig);
+       export function ChannelMonitorUpdate_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelMonitorUpdate_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z ChannelMonitorUpdate_write(const struct LDKChannelMonitorUpdate *NONNULL_PTR obj);
        export function ChannelMonitorUpdate_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -3696,7 +5178,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HTLCUpdate_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKHTLCUpdate HTLCUpdate_read(struct LDKu8slice ser);
+       // struct LDKCResult_HTLCUpdateDecodeErrorZ HTLCUpdate_read(struct LDKu8slice ser);
        export function HTLCUpdate_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3728,7 +5210,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMonitor_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
+       // MUST_USE_RES struct LDKCResult_NoneMonitorUpdateErrorZ ChannelMonitor_update_monitor(const struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKChannelMonitorUpdate *NONNULL_PTR updates, const struct LDKBroadcasterInterface *NONNULL_PTR broadcaster, const struct LDKFeeEstimator *NONNULL_PTR fee_estimator, const struct LDKLogger *NONNULL_PTR logger);
        export function ChannelMonitor_update_monitor(this_arg: number, updates: number, broadcaster: number, fee_estimator: number, logger: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3752,7 +5234,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMonitor_get_funding_txo(this_arg);
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(struct LDKChannelMonitor *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCVec_MonitorEventZ ChannelMonitor_get_and_clear_pending_monitor_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
        export function ChannelMonitor_get_and_clear_pending_monitor_events(this_arg: number): number[] {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3760,7 +5242,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_monitor_events(this_arg);
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(struct LDKChannelMonitor *NONNULL_PTR this_arg);
+       // MUST_USE_RES struct LDKCVec_EventZ ChannelMonitor_get_and_clear_pending_events(const struct LDKChannelMonitor *NONNULL_PTR this_arg);
        export function ChannelMonitor_get_and_clear_pending_events(this_arg: number): number[] {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3768,7 +5250,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMonitor_get_and_clear_pending_events(this_arg);
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKCVec_TransactionZ ChannelMonitor_get_latest_holder_commitment_txn(struct LDKChannelMonitor *NONNULL_PTR this_arg, const struct LDKLogger *NONNULL_PTR logger);
+       // 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);
        export function ChannelMonitor_get_latest_holder_commitment_txn(this_arg: number, logger: number): Uint8Array[] {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3776,7 +5258,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMonitor_get_latest_holder_commitment_txn(this_arg, logger);
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_C2Tuple_u32TxOutZZZZ ChannelMonitor_block_connected(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, struct LDKLogger logger);
+       // MUST_USE_RES struct LDKCVec_C2Tuple_TxidCVec_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, struct LDKLogger logger);
        export function ChannelMonitor_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number, broadcaster: number, fee_estimator: number, logger: number): number[] {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3784,7 +5266,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelMonitor_block_connected(this_arg, encodeArray(header), txdata, height, broadcaster, fee_estimator, logger);
                return nativeResponseValue;
        }
-       // void ChannelMonitor_block_disconnected(struct LDKChannelMonitor *NONNULL_PTR this_arg, const uint8_t (*header)[80], uint32_t height, struct LDKBroadcasterInterface broadcaster, struct LDKFeeEstimator fee_estimator, struct LDKLogger 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, struct LDKLogger logger);
        export function ChannelMonitor_block_disconnected(this_arg: number, header: Uint8Array, height: number, broadcaster: number, fee_estimator: number, logger: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -3816,6 +5298,46 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.OutPoint_free(this_ptr);
                // debug statements here
        }
+       // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
+       export function OutPoint_get_txid(this_ptr: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
+               return decodeArray(nativeResponseValue);
+       }
+       // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
+               // debug statements here
+       }
+       // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
+       export function OutPoint_get_index(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
+               return nativeResponseValue;
+       }
+       // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
+       export function OutPoint_set_index(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
+               // debug statements here
+       }
+       // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
+       export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
+               return nativeResponseValue;
+       }
        // struct LDKOutPoint OutPoint_clone(const struct LDKOutPoint *NONNULL_PTR orig);
        export function OutPoint_clone(orig: number): number {
                if(!isWasmInitialized) {
@@ -3824,68 +5346,236 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.OutPoint_clone(orig);
                return nativeResponseValue;
        }
-       // const uint8_t (*OutPoint_get_txid(const struct LDKOutPoint *NONNULL_PTR this_ptr))[32];
-       export function OutPoint_get_txid(this_ptr: number): Uint8Array {
+       // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
+       export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OutPoint_get_txid(this_ptr);
+               const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
                return decodeArray(nativeResponseValue);
        }
-       // void OutPoint_set_txid(struct LDKOutPoint *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       export function OutPoint_set_txid(this_ptr: number, val: Uint8Array): void {
+       // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
+       export function OutPoint_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OutPoint_set_txid(this_ptr, encodeArray(val));
+               const nativeResponseValue = wasm.OutPoint_write(obj);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKCResult_OutPointDecodeErrorZ OutPoint_read(struct LDKu8slice ser);
+       export function OutPoint_read(ser: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
+               return nativeResponseValue;
+       }
+       // void DelayedPaymentOutputDescriptor_free(struct LDKDelayedPaymentOutputDescriptor this_ptr);
+       export function DelayedPaymentOutputDescriptor_free(this_ptr: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_free(this_ptr);
+               // debug statements here
+       }
+       // struct LDKOutPoint DelayedPaymentOutputDescriptor_get_outpoint(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       export function DelayedPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_outpoint(this_ptr);
+               return nativeResponseValue;
+       }
+       // void DelayedPaymentOutputDescriptor_set_outpoint(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+       export function DelayedPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_outpoint(this_ptr, val);
+               // debug statements here
+       }
+       // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_per_commitment_point(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       export function DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_per_commitment_point(this_ptr);
+               return decodeArray(nativeResponseValue);
+       }
+       // void DelayedPaymentOutputDescriptor_set_per_commitment_point(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       export function DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr: number, val: Uint8Array): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_per_commitment_point(this_ptr, encodeArray(val));
+               // debug statements here
+       }
+       // uint16_t DelayedPaymentOutputDescriptor_get_to_self_delay(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       export function DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_to_self_delay(this_ptr);
+               return nativeResponseValue;
+       }
+       // void DelayedPaymentOutputDescriptor_set_to_self_delay(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint16_t val);
+       export function DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_to_self_delay(this_ptr, val);
+               // debug statements here
+       }
+       // void DelayedPaymentOutputDescriptor_set_output(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
+       export function DelayedPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_output(this_ptr, val);
+               // debug statements here
+       }
+       // struct LDKPublicKey DelayedPaymentOutputDescriptor_get_revocation_pubkey(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       export function DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this_ptr);
+               return decodeArray(nativeResponseValue);
+       }
+       // void DelayedPaymentOutputDescriptor_set_revocation_pubkey(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKPublicKey val);
+       export function DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr: number, val: Uint8Array): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this_ptr, encodeArray(val));
+               // debug statements here
+       }
+       // const uint8_t (*DelayedPaymentOutputDescriptor_get_channel_keys_id(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
+       export function DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
+               return decodeArray(nativeResponseValue);
+       }
+       // void DelayedPaymentOutputDescriptor_set_channel_keys_id(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       export function DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
+               // debug statements here
+       }
+       // uint64_t DelayedPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       export function DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
+               return nativeResponseValue;
+       }
+       // void DelayedPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
+       export function DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.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 LDKPublicKey revocation_pubkey_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
+       export function DelayedPaymentOutputDescriptor_new(outpoint_arg: number, per_commitment_point_arg: Uint8Array, to_self_delay_arg: number, output_arg: number, revocation_pubkey_arg: Uint8Array, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_new(outpoint_arg, encodeArray(per_commitment_point_arg), to_self_delay_arg, output_arg, encodeArray(revocation_pubkey_arg), encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
+               return nativeResponseValue;
+       }
+       // struct LDKDelayedPaymentOutputDescriptor DelayedPaymentOutputDescriptor_clone(const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR orig);
+       export function DelayedPaymentOutputDescriptor_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DelayedPaymentOutputDescriptor_clone(orig);
+               return nativeResponseValue;
+       }
+       // void StaticPaymentOutputDescriptor_free(struct LDKStaticPaymentOutputDescriptor this_ptr);
+       export function StaticPaymentOutputDescriptor_free(this_ptr: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_free(this_ptr);
+               // debug statements here
+       }
+       // struct LDKOutPoint StaticPaymentOutputDescriptor_get_outpoint(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       export function StaticPaymentOutputDescriptor_get_outpoint(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_outpoint(this_ptr);
+               return nativeResponseValue;
+       }
+       // void StaticPaymentOutputDescriptor_set_outpoint(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKOutPoint val);
+       export function StaticPaymentOutputDescriptor_set_outpoint(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_outpoint(this_ptr, val);
+               // debug statements here
+       }
+       // void StaticPaymentOutputDescriptor_set_output(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKTxOut val);
+       export function StaticPaymentOutputDescriptor_set_output(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_output(this_ptr, val);
                // debug statements here
        }
-       // uint16_t OutPoint_get_index(const struct LDKOutPoint *NONNULL_PTR this_ptr);
-       export function OutPoint_get_index(this_ptr: number): number {
+       // const uint8_t (*StaticPaymentOutputDescriptor_get_channel_keys_id(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr))[32];
+       export function StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OutPoint_get_index(this_ptr);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_keys_id(this_ptr);
+               return decodeArray(nativeResponseValue);
        }
-       // void OutPoint_set_index(struct LDKOutPoint *NONNULL_PTR this_ptr, uint16_t val);
-       export function OutPoint_set_index(this_ptr: number, val: number): void {
+       // void StaticPaymentOutputDescriptor_set_channel_keys_id(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       export function StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr: number, val: Uint8Array): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OutPoint_set_index(this_ptr, val);
+               const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_keys_id(this_ptr, encodeArray(val));
                // debug statements here
        }
-       // MUST_USE_RES struct LDKOutPoint OutPoint_new(struct LDKThirtyTwoBytes txid_arg, uint16_t index_arg);
-       export function OutPoint_new(txid_arg: Uint8Array, index_arg: number): number {
+       // uint64_t StaticPaymentOutputDescriptor_get_channel_value_satoshis(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr);
+       export function StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OutPoint_new(encodeArray(txid_arg), index_arg);
+               const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this_ptr);
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKThirtyTwoBytes OutPoint_to_channel_id(const struct LDKOutPoint *NONNULL_PTR this_arg);
-       export function OutPoint_to_channel_id(this_arg: number): Uint8Array {
+       // void StaticPaymentOutputDescriptor_set_channel_value_satoshis(struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR this_ptr, uint64_t val);
+       export function StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr: number, val: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OutPoint_to_channel_id(this_arg);
-               return decodeArray(nativeResponseValue);
+               const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this_ptr, val);
+               // debug statements here
        }
-       // struct LDKCVec_u8Z OutPoint_write(const struct LDKOutPoint *NONNULL_PTR obj);
-       export function OutPoint_write(obj: number): Uint8Array {
+       // MUST_USE_RES struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_new(struct LDKOutPoint outpoint_arg, struct LDKTxOut output_arg, struct LDKThirtyTwoBytes channel_keys_id_arg, uint64_t channel_value_satoshis_arg);
+       export function StaticPaymentOutputDescriptor_new(outpoint_arg: number, output_arg: number, channel_keys_id_arg: Uint8Array, channel_value_satoshis_arg: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OutPoint_write(obj);
-               return decodeArray(nativeResponseValue);
+               const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_new(outpoint_arg, output_arg, encodeArray(channel_keys_id_arg), channel_value_satoshis_arg);
+               return nativeResponseValue;
        }
-       // struct LDKOutPoint OutPoint_read(struct LDKu8slice ser);
-       export function OutPoint_read(ser: Uint8Array): number {
+       // struct LDKStaticPaymentOutputDescriptor StaticPaymentOutputDescriptor_clone(const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR orig);
+       export function StaticPaymentOutputDescriptor_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OutPoint_read(encodeArray(ser));
+               const nativeResponseValue = wasm.StaticPaymentOutputDescriptor_clone(orig);
                return nativeResponseValue;
        }
        // void SpendableOutputDescriptor_free(struct LDKSpendableOutputDescriptor this_ptr);
@@ -3920,20 +5610,20 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.SpendableOutputDescriptor_read(encodeArray(ser));
                return nativeResponseValue;
        }
-       // struct LDKChannelKeys ChannelKeys_clone(const struct LDKChannelKeys *NONNULL_PTR orig);
-       export function ChannelKeys_clone(orig: number): number {
+       // struct LDKSign Sign_clone(const struct LDKSign *NONNULL_PTR orig);
+       export function Sign_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_clone(orig);
+               const nativeResponseValue = wasm.Sign_clone(orig);
                return nativeResponseValue;
        }
-       // void ChannelKeys_free(struct LDKChannelKeys this_ptr);
-       export function ChannelKeys_free(this_ptr: number): void {
+       // void Sign_free(struct LDKSign this_ptr);
+       export function Sign_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelKeys_free(this_ptr);
+               const nativeResponseValue = wasm.Sign_free(this_ptr);
                // debug statements here
        }
        // void KeysInterface_free(struct LDKKeysInterface this_ptr);
@@ -3944,196 +5634,212 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.KeysInterface_free(this_ptr);
                // debug statements here
        }
-       // void InMemoryChannelKeys_free(struct LDKInMemoryChannelKeys this_ptr);
-       export function InMemoryChannelKeys_free(this_ptr: number): void {
+       // void InMemorySigner_free(struct LDKInMemorySigner this_ptr);
+       export function InMemorySigner_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_free(this_ptr);
+               const nativeResponseValue = wasm.InMemorySigner_free(this_ptr);
                // debug statements here
        }
-       // struct LDKInMemoryChannelKeys InMemoryChannelKeys_clone(const struct LDKInMemoryChannelKeys *NONNULL_PTR orig);
-       export function InMemoryChannelKeys_clone(orig: number): number {
+       // const uint8_t (*InMemorySigner_get_funding_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       export function InMemorySigner_get_funding_key(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.InMemorySigner_get_funding_key(this_ptr);
+               return decodeArray(nativeResponseValue);
+       }
+       // void InMemorySigner_set_funding_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+       export function InMemorySigner_set_funding_key(this_ptr: number, val: Uint8Array): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.InMemorySigner_set_funding_key(this_ptr, encodeArray(val));
+               // debug statements here
        }
-       // const uint8_t (*InMemoryChannelKeys_get_funding_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       export function InMemoryChannelKeys_get_funding_key(this_ptr: number): Uint8Array {
+       // const uint8_t (*InMemorySigner_get_revocation_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       export function InMemorySigner_get_revocation_base_key(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_get_funding_key(this_ptr);
+               const nativeResponseValue = wasm.InMemorySigner_get_revocation_base_key(this_ptr);
                return decodeArray(nativeResponseValue);
        }
-       // void InMemoryChannelKeys_set_funding_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
-       export function InMemoryChannelKeys_set_funding_key(this_ptr: number, val: Uint8Array): void {
+       // void InMemorySigner_set_revocation_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+       export function InMemorySigner_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_set_funding_key(this_ptr, encodeArray(val));
+               const nativeResponseValue = wasm.InMemorySigner_set_revocation_base_key(this_ptr, encodeArray(val));
                // debug statements here
        }
-       // const uint8_t (*InMemoryChannelKeys_get_revocation_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       export function InMemoryChannelKeys_get_revocation_base_key(this_ptr: number): Uint8Array {
+       // const uint8_t (*InMemorySigner_get_payment_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       export function InMemorySigner_get_payment_key(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_get_revocation_base_key(this_ptr);
+               const nativeResponseValue = wasm.InMemorySigner_get_payment_key(this_ptr);
                return decodeArray(nativeResponseValue);
        }
-       // void InMemoryChannelKeys_set_revocation_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
-       export function InMemoryChannelKeys_set_revocation_base_key(this_ptr: number, val: Uint8Array): void {
+       // void InMemorySigner_set_payment_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+       export function InMemorySigner_set_payment_key(this_ptr: number, val: Uint8Array): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_set_revocation_base_key(this_ptr, encodeArray(val));
+               const nativeResponseValue = wasm.InMemorySigner_set_payment_key(this_ptr, encodeArray(val));
                // debug statements here
        }
-       // const uint8_t (*InMemoryChannelKeys_get_payment_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       export function InMemoryChannelKeys_get_payment_key(this_ptr: number): Uint8Array {
+       // const uint8_t (*InMemorySigner_get_delayed_payment_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       export function InMemorySigner_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_get_payment_key(this_ptr);
+               const nativeResponseValue = wasm.InMemorySigner_get_delayed_payment_base_key(this_ptr);
                return decodeArray(nativeResponseValue);
        }
-       // void InMemoryChannelKeys_set_payment_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
-       export function InMemoryChannelKeys_set_payment_key(this_ptr: number, val: Uint8Array): void {
+       // void InMemorySigner_set_delayed_payment_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+       export function InMemorySigner_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_set_payment_key(this_ptr, encodeArray(val));
+               const nativeResponseValue = wasm.InMemorySigner_set_delayed_payment_base_key(this_ptr, encodeArray(val));
                // debug statements here
        }
-       // const uint8_t (*InMemoryChannelKeys_get_delayed_payment_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       export function InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr: number): Uint8Array {
+       // const uint8_t (*InMemorySigner_get_htlc_base_key(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       export function InMemorySigner_get_htlc_base_key(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_get_delayed_payment_base_key(this_ptr);
+               const nativeResponseValue = wasm.InMemorySigner_get_htlc_base_key(this_ptr);
                return decodeArray(nativeResponseValue);
        }
-       // void InMemoryChannelKeys_set_delayed_payment_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
-       export function InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr: number, val: Uint8Array): void {
+       // void InMemorySigner_set_htlc_base_key(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKSecretKey val);
+       export function InMemorySigner_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_set_delayed_payment_base_key(this_ptr, encodeArray(val));
+               const nativeResponseValue = wasm.InMemorySigner_set_htlc_base_key(this_ptr, encodeArray(val));
                // debug statements here
        }
-       // const uint8_t (*InMemoryChannelKeys_get_htlc_base_key(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       export function InMemoryChannelKeys_get_htlc_base_key(this_ptr: number): Uint8Array {
+       // const uint8_t (*InMemorySigner_get_commitment_seed(const struct LDKInMemorySigner *NONNULL_PTR this_ptr))[32];
+       export function InMemorySigner_get_commitment_seed(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_get_htlc_base_key(this_ptr);
+               const nativeResponseValue = wasm.InMemorySigner_get_commitment_seed(this_ptr);
                return decodeArray(nativeResponseValue);
        }
-       // void InMemoryChannelKeys_set_htlc_base_key(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKSecretKey val);
-       export function InMemoryChannelKeys_set_htlc_base_key(this_ptr: number, val: Uint8Array): void {
+       // void InMemorySigner_set_commitment_seed(struct LDKInMemorySigner *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       export function InMemorySigner_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_set_htlc_base_key(this_ptr, encodeArray(val));
+               const nativeResponseValue = wasm.InMemorySigner_set_commitment_seed(this_ptr, encodeArray(val));
                // debug statements here
        }
-       // const uint8_t (*InMemoryChannelKeys_get_commitment_seed(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr))[32];
-       export function InMemoryChannelKeys_get_commitment_seed(this_ptr: number): Uint8Array {
+       // struct LDKInMemorySigner InMemorySigner_clone(const struct LDKInMemorySigner *NONNULL_PTR orig);
+       export function InMemorySigner_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_get_commitment_seed(this_ptr);
-               return decodeArray(nativeResponseValue);
+               const nativeResponseValue = wasm.InMemorySigner_clone(orig);
+               return nativeResponseValue;
        }
-       // void InMemoryChannelKeys_set_commitment_seed(struct LDKInMemoryChannelKeys *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
-       export function InMemoryChannelKeys_set_commitment_seed(this_ptr: number, val: Uint8Array): void {
+       // MUST_USE_RES struct LDKInMemorySigner InMemorySigner_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKThirtyTwoBytes channel_keys_id);
+       export function InMemorySigner_new(funding_key: Uint8Array, revocation_base_key: Uint8Array, payment_key: Uint8Array, delayed_payment_base_key: Uint8Array, htlc_base_key: Uint8Array, commitment_seed: Uint8Array, channel_value_satoshis: number, channel_keys_id: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_set_commitment_seed(this_ptr, encodeArray(val));
-               // debug statements here
+               const nativeResponseValue = wasm.InMemorySigner_new(encodeArray(funding_key), encodeArray(revocation_base_key), encodeArray(payment_key), encodeArray(delayed_payment_base_key), encodeArray(htlc_base_key), encodeArray(commitment_seed), channel_value_satoshis, encodeArray(channel_keys_id));
+               return nativeResponseValue;
+       }
+       // MUST_USE_RES struct LDKChannelPublicKeys InMemorySigner_counterparty_pubkeys(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       export function InMemorySigner_counterparty_pubkeys(this_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.InMemorySigner_counterparty_pubkeys(this_arg);
+               return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKInMemoryChannelKeys InMemoryChannelKeys_new(struct LDKSecretKey funding_key, struct LDKSecretKey revocation_base_key, struct LDKSecretKey payment_key, struct LDKSecretKey delayed_payment_base_key, struct LDKSecretKey htlc_base_key, struct LDKThirtyTwoBytes commitment_seed, uint64_t channel_value_satoshis, struct LDKC2Tuple_u64u64Z key_derivation_params);
-       export function InMemoryChannelKeys_new(funding_key: Uint8Array, revocation_base_key: Uint8Array, payment_key: Uint8Array, delayed_payment_base_key: Uint8Array, htlc_base_key: Uint8Array, commitment_seed: Uint8Array, channel_value_satoshis: number, key_derivation_params: number): number {
+       // MUST_USE_RES uint16_t InMemorySigner_counterparty_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       export function InMemorySigner_counterparty_selected_contest_delay(this_arg: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_new(encodeArray(funding_key), encodeArray(revocation_base_key), encodeArray(payment_key), encodeArray(delayed_payment_base_key), encodeArray(htlc_base_key), encodeArray(commitment_seed), channel_value_satoshis, key_derivation_params);
+               const nativeResponseValue = wasm.InMemorySigner_counterparty_selected_contest_delay(this_arg);
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKChannelPublicKeys InMemoryChannelKeys_counterparty_pubkeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       export function InMemoryChannelKeys_counterparty_pubkeys(this_arg: number): number {
+       // MUST_USE_RES uint16_t InMemorySigner_holder_selected_contest_delay(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       export function InMemorySigner_holder_selected_contest_delay(this_arg: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_counterparty_pubkeys(this_arg);
+               const nativeResponseValue = wasm.InMemorySigner_holder_selected_contest_delay(this_arg);
                return nativeResponseValue;
        }
-       // MUST_USE_RES uint16_t InMemoryChannelKeys_counterparty_selected_contest_delay(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       export function InMemoryChannelKeys_counterparty_selected_contest_delay(this_arg: number): number {
+       // MUST_USE_RES bool InMemorySigner_is_outbound(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       export function InMemorySigner_is_outbound(this_arg: number): boolean {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_counterparty_selected_contest_delay(this_arg);
+               const nativeResponseValue = wasm.InMemorySigner_is_outbound(this_arg);
                return nativeResponseValue;
        }
-       // MUST_USE_RES uint16_t InMemoryChannelKeys_holder_selected_contest_delay(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       export function InMemoryChannelKeys_holder_selected_contest_delay(this_arg: number): number {
+       // MUST_USE_RES struct LDKOutPoint InMemorySigner_funding_outpoint(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       export function InMemorySigner_funding_outpoint(this_arg: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_holder_selected_contest_delay(this_arg);
+               const nativeResponseValue = wasm.InMemorySigner_funding_outpoint(this_arg);
                return nativeResponseValue;
        }
-       // MUST_USE_RES bool InMemoryChannelKeys_is_outbound(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       export function InMemoryChannelKeys_is_outbound(this_arg: number): boolean {
+       // MUST_USE_RES struct LDKChannelTransactionParameters InMemorySigner_get_channel_parameters(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       export function InMemorySigner_get_channel_parameters(this_arg: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_is_outbound(this_arg);
+               const nativeResponseValue = wasm.InMemorySigner_get_channel_parameters(this_arg);
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKOutPoint InMemoryChannelKeys_funding_outpoint(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       export function InMemoryChannelKeys_funding_outpoint(this_arg: number): number {
+       // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_counterparty_payment_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKStaticPaymentOutputDescriptor *NONNULL_PTR descriptor);
+       export function InMemorySigner_sign_counterparty_payment_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_funding_outpoint(this_arg);
+               const nativeResponseValue = wasm.InMemorySigner_sign_counterparty_payment_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKChannelTransactionParameters InMemoryChannelKeys_get_channel_parameters(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       export function InMemoryChannelKeys_get_channel_parameters(this_arg: number): number {
+       // MUST_USE_RES struct LDKCResult_CVec_CVec_u8ZZNoneZ InMemorySigner_sign_dynamic_p2wsh_input(const struct LDKInMemorySigner *NONNULL_PTR this_arg, struct LDKTransaction spend_tx, uintptr_t input_idx, const struct LDKDelayedPaymentOutputDescriptor *NONNULL_PTR descriptor);
+       export function InMemorySigner_sign_dynamic_p2wsh_input(this_arg: number, spend_tx: Uint8Array, input_idx: number, descriptor: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_get_channel_parameters(this_arg);
+               const nativeResponseValue = wasm.InMemorySigner_sign_dynamic_p2wsh_input(this_arg, encodeArray(spend_tx), input_idx, descriptor);
                return nativeResponseValue;
        }
-       // struct LDKChannelKeys InMemoryChannelKeys_as_ChannelKeys(const struct LDKInMemoryChannelKeys *NONNULL_PTR this_arg);
-       export function InMemoryChannelKeys_as_ChannelKeys(this_arg: number): number {
+       // struct LDKSign InMemorySigner_as_Sign(const struct LDKInMemorySigner *NONNULL_PTR this_arg);
+       export function InMemorySigner_as_Sign(this_arg: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_as_ChannelKeys(this_arg);
+               const nativeResponseValue = wasm.InMemorySigner_as_Sign(this_arg);
                return nativeResponseValue;
        }
-       // struct LDKCVec_u8Z InMemoryChannelKeys_write(const struct LDKInMemoryChannelKeys *NONNULL_PTR obj);
-       export function InMemoryChannelKeys_write(obj: number): Uint8Array {
+       // struct LDKCVec_u8Z InMemorySigner_write(const struct LDKInMemorySigner *NONNULL_PTR obj);
+       export function InMemorySigner_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_write(obj);
+               const nativeResponseValue = wasm.InMemorySigner_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKCResult_InMemoryChannelKeysDecodeErrorZ InMemoryChannelKeys_read(struct LDKu8slice ser);
-       export function InMemoryChannelKeys_read(ser: Uint8Array): number {
+       // struct LDKCResult_InMemorySignerDecodeErrorZ InMemorySigner_read(struct LDKu8slice ser);
+       export function InMemorySigner_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.InMemoryChannelKeys_read(encodeArray(ser));
+               const nativeResponseValue = wasm.InMemorySigner_read(encodeArray(ser));
                return nativeResponseValue;
        }
        // void KeysManager_free(struct LDKKeysManager this_ptr);
@@ -4144,20 +5850,28 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.KeysManager_free(this_ptr);
                // debug statements here
        }
-       // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], enum LDKNetwork network, uint64_t starting_time_secs, uint32_t starting_time_nanos);
-       export function KeysManager_new(seed: Uint8Array, network: LDKNetwork, starting_time_secs: number, starting_time_nanos: number): number {
+       // MUST_USE_RES struct LDKKeysManager KeysManager_new(const uint8_t (*seed)[32], uint64_t starting_time_secs, uint32_t starting_time_nanos);
+       export function KeysManager_new(seed: Uint8Array, starting_time_secs: number, starting_time_nanos: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), starting_time_secs, starting_time_nanos);
+               return nativeResponseValue;
+       }
+       // MUST_USE_RES struct LDKInMemorySigner KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, const uint8_t (*params)[32]);
+       export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.KeysManager_new(encodeArray(seed), network, starting_time_secs, starting_time_nanos);
+               const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, encodeArray(params));
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKInMemoryChannelKeys KeysManager_derive_channel_keys(const struct LDKKeysManager *NONNULL_PTR this_arg, uint64_t channel_value_satoshis, uint64_t params_1, uint64_t params_2);
-       export function KeysManager_derive_channel_keys(this_arg: number, channel_value_satoshis: number, params_1: number, params_2: number): number {
+       // 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);
+       export function KeysManager_spend_spendable_outputs(this_arg: number, descriptors: number[], outputs: number[], change_destination_script: Uint8Array, feerate_sat_per_1000_weight: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.KeysManager_derive_channel_keys(this_arg, channel_value_satoshis, params_1, params_2);
+               const nativeResponseValue = wasm.KeysManager_spend_spendable_outputs(this_arg, descriptors, outputs, encodeArray(change_destination_script), feerate_sat_per_1000_weight);
                return nativeResponseValue;
        }
        // struct LDKKeysInterface KeysManager_as_KeysInterface(const struct LDKKeysManager *NONNULL_PTR this_arg);
@@ -4176,22 +5890,78 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelManager_free(this_ptr);
                // debug statements here
        }
-       // void ChannelDetails_free(struct LDKChannelDetails this_ptr);
-       export function ChannelDetails_free(this_ptr: number): void {
+       // void ChainParameters_free(struct LDKChainParameters this_ptr);
+       export function ChainParameters_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelDetails_free(this_ptr);
+               const nativeResponseValue = wasm.ChainParameters_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
-       export function ChannelDetails_clone(orig: number): number {
+       // enum LDKNetwork ChainParameters_get_network(const struct LDKChainParameters *NONNULL_PTR this_ptr);
+       export function ChainParameters_get_network(this_ptr: number): LDKNetwork {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelDetails_clone(orig);
+               const nativeResponseValue = wasm.ChainParameters_get_network(this_ptr);
+               return nativeResponseValue;
+       }
+       // void ChainParameters_set_network(struct LDKChainParameters *NONNULL_PTR this_ptr, enum LDKNetwork val);
+       export function ChainParameters_set_network(this_ptr: number, val: LDKNetwork): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChainParameters_set_network(this_ptr, val);
+               // debug statements here
+       }
+       // const uint8_t (*ChainParameters_get_latest_hash(const struct LDKChainParameters *NONNULL_PTR this_ptr))[32];
+       export function ChainParameters_get_latest_hash(this_ptr: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChainParameters_get_latest_hash(this_ptr);
+               return decodeArray(nativeResponseValue);
+       }
+       // void ChainParameters_set_latest_hash(struct LDKChainParameters *NONNULL_PTR this_ptr, struct LDKThirtyTwoBytes val);
+       export function ChainParameters_set_latest_hash(this_ptr: number, val: Uint8Array): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChainParameters_set_latest_hash(this_ptr, encodeArray(val));
+               // debug statements here
+       }
+       // uintptr_t ChainParameters_get_latest_height(const struct LDKChainParameters *NONNULL_PTR this_ptr);
+       export function ChainParameters_get_latest_height(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChainParameters_get_latest_height(this_ptr);
+               return nativeResponseValue;
+       }
+       // void ChainParameters_set_latest_height(struct LDKChainParameters *NONNULL_PTR this_ptr, uintptr_t val);
+       export function ChainParameters_set_latest_height(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChainParameters_set_latest_height(this_ptr, val);
+               // debug statements here
+       }
+       // MUST_USE_RES struct LDKChainParameters ChainParameters_new(enum LDKNetwork network_arg, struct LDKThirtyTwoBytes latest_hash_arg, uintptr_t latest_height_arg);
+       export function ChainParameters_new(network_arg: LDKNetwork, latest_hash_arg: Uint8Array, latest_height_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChainParameters_new(network_arg, encodeArray(latest_hash_arg), latest_height_arg);
                return nativeResponseValue;
        }
+       // void ChannelDetails_free(struct LDKChannelDetails this_ptr);
+       export function ChannelDetails_free(this_ptr: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelDetails_free(this_ptr);
+               // debug statements here
+       }
        // const uint8_t (*ChannelDetails_get_channel_id(const struct LDKChannelDetails *NONNULL_PTR this_ptr))[32];
        export function ChannelDetails_get_channel_id(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -4320,6 +6090,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelDetails_set_is_live(this_ptr, val);
                // debug statements here
        }
+       // struct LDKChannelDetails ChannelDetails_clone(const struct LDKChannelDetails *NONNULL_PTR orig);
+       export function ChannelDetails_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelDetails_clone(orig);
+               return nativeResponseValue;
+       }
        // void PaymentSendFailure_free(struct LDKPaymentSendFailure this_ptr);
        export function PaymentSendFailure_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -4336,12 +6114,12 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.PaymentSendFailure_clone(orig);
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKChannelManager ChannelManager_new(enum LDKNetwork network, struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, uintptr_t current_blockchain_height);
-       export function ChannelManager_new(network: LDKNetwork, fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, current_blockchain_height: number): number {
+       // MUST_USE_RES struct LDKChannelManager ChannelManager_new(struct LDKFeeEstimator fee_est, struct LDKWatch chain_monitor, struct LDKBroadcasterInterface tx_broadcaster, struct LDKLogger logger, struct LDKKeysInterface keys_manager, struct LDKUserConfig config, struct LDKChainParameters params);
+       export function ChannelManager_new(fee_est: number, chain_monitor: number, tx_broadcaster: number, logger: number, keys_manager: number, config: number, params: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelManager_new(network, fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, current_blockchain_height);
+               const nativeResponseValue = wasm.ChannelManager_new(fee_est, chain_monitor, tx_broadcaster, logger, keys_manager, config, params);
                return nativeResponseValue;
        }
        // MUST_USE_RES struct LDKCResult_NoneAPIErrorZ ChannelManager_create_channel(const struct LDKChannelManager *NONNULL_PTR this_arg, struct LDKPublicKey their_network_key, uint64_t channel_value_satoshis, uint64_t push_msat, uint64_t user_id, struct LDKUserConfig override_config);
@@ -4480,6 +6258,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelManager_as_EventsProvider(this_arg);
                return nativeResponseValue;
        }
+       // struct LDKListen ChannelManager_as_Listen(const struct LDKChannelManager *NONNULL_PTR this_arg);
+       export function ChannelManager_as_Listen(this_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelManager_as_Listen(this_arg);
+               return nativeResponseValue;
+       }
        // void ChannelManager_block_connected(const struct LDKChannelManager *NONNULL_PTR this_arg, const uint8_t (*header)[80], struct LDKCVec_C2Tuple_usizeTransactionZZ txdata, uint32_t height);
        export function ChannelManager_block_connected(this_arg: number, header: Uint8Array, txdata: number[], height: number): void {
                if(!isWasmInitialized) {
@@ -4496,6 +6282,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelManager_block_disconnected(this_arg, encodeArray(header));
                // debug statements here
        }
+       // void ChannelManager_await_persistable_update(const struct LDKChannelManager *NONNULL_PTR this_arg);
+       export function ChannelManager_await_persistable_update(this_arg: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelManager_await_persistable_update(this_arg);
+               // debug statements here
+       }
        // struct LDKChannelMessageHandler ChannelManager_as_ChannelMessageHandler(const struct LDKChannelManager *NONNULL_PTR this_arg);
        export function ChannelManager_as_ChannelMessageHandler(this_arg: number): number {
                if(!isWasmInitialized) {
@@ -4656,6 +6450,30 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Init_free(this_ptr);
                // debug statements here
        }
+       // struct LDKInitFeatures Init_get_features(const struct LDKInit *NONNULL_PTR this_ptr);
+       export function Init_get_features(this_ptr: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.Init_get_features(this_ptr);
+               return nativeResponseValue;
+       }
+       // void Init_set_features(struct LDKInit *NONNULL_PTR this_ptr, struct LDKInitFeatures val);
+       export function Init_set_features(this_ptr: number, val: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.Init_set_features(this_ptr, val);
+               // debug statements here
+       }
+       // MUST_USE_RES struct LDKInit Init_new(struct LDKInitFeatures features_arg);
+       export function Init_new(features_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.Init_new(features_arg);
+               return nativeResponseValue;
+       }
        // struct LDKInit Init_clone(const struct LDKInit *NONNULL_PTR orig);
        export function Init_clone(orig: number): number {
                if(!isWasmInitialized) {
@@ -4672,14 +6490,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ErrorMessage_free(this_ptr);
                // debug statements here
        }
-       // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
-       export function ErrorMessage_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ErrorMessage_clone(orig);
-               return nativeResponseValue;
-       }
        // const uint8_t (*ErrorMessage_get_channel_id(const struct LDKErrorMessage *NONNULL_PTR this_ptr))[32];
        export function ErrorMessage_get_channel_id(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -4720,21 +6530,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ErrorMessage_new(encodeArray(channel_id_arg), encodeArray(data_arg));
                return nativeResponseValue;
        }
-       // void Ping_free(struct LDKPing this_ptr);
-       export function Ping_free(this_ptr: number): void {
+       // struct LDKErrorMessage ErrorMessage_clone(const struct LDKErrorMessage *NONNULL_PTR orig);
+       export function ErrorMessage_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Ping_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ErrorMessage_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
-       export function Ping_clone(orig: number): number {
+       // void Ping_free(struct LDKPing this_ptr);
+       export function Ping_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Ping_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.Ping_free(this_ptr);
+               // debug statements here
        }
        // uint16_t Ping_get_ponglen(const struct LDKPing *NONNULL_PTR this_ptr);
        export function Ping_get_ponglen(this_ptr: number): number {
@@ -4776,21 +6586,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Ping_new(ponglen_arg, byteslen_arg);
                return nativeResponseValue;
        }
-       // void Pong_free(struct LDKPong this_ptr);
-       export function Pong_free(this_ptr: number): void {
+       // struct LDKPing Ping_clone(const struct LDKPing *NONNULL_PTR orig);
+       export function Ping_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Pong_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.Ping_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
-       export function Pong_clone(orig: number): number {
+       // void Pong_free(struct LDKPong this_ptr);
+       export function Pong_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Pong_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.Pong_free(this_ptr);
+               // debug statements here
        }
        // uint16_t Pong_get_byteslen(const struct LDKPong *NONNULL_PTR this_ptr);
        export function Pong_get_byteslen(this_ptr: number): number {
@@ -4816,21 +6626,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Pong_new(byteslen_arg);
                return nativeResponseValue;
        }
-       // void OpenChannel_free(struct LDKOpenChannel this_ptr);
-       export function OpenChannel_free(this_ptr: number): void {
+       // struct LDKPong Pong_clone(const struct LDKPong *NONNULL_PTR orig);
+       export function Pong_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OpenChannel_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.Pong_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
-       export function OpenChannel_clone(orig: number): number {
+       // void OpenChannel_free(struct LDKOpenChannel this_ptr);
+       export function OpenChannel_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.OpenChannel_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.OpenChannel_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*OpenChannel_get_chain_hash(const struct LDKOpenChannel *NONNULL_PTR this_ptr))[32];
        export function OpenChannel_get_chain_hash(this_ptr: number): Uint8Array {
@@ -5120,21 +6930,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.OpenChannel_set_channel_flags(this_ptr, val);
                // debug statements here
        }
-       // void AcceptChannel_free(struct LDKAcceptChannel this_ptr);
-       export function AcceptChannel_free(this_ptr: number): void {
+       // struct LDKOpenChannel OpenChannel_clone(const struct LDKOpenChannel *NONNULL_PTR orig);
+       export function OpenChannel_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.AcceptChannel_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.OpenChannel_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
-       export function AcceptChannel_clone(orig: number): number {
+       // void AcceptChannel_free(struct LDKAcceptChannel this_ptr);
+       export function AcceptChannel_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.AcceptChannel_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.AcceptChannel_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*AcceptChannel_get_temporary_channel_id(const struct LDKAcceptChannel *NONNULL_PTR this_ptr))[32];
        export function AcceptChannel_get_temporary_channel_id(this_ptr: number): Uint8Array {
@@ -5360,21 +7170,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.AcceptChannel_set_first_per_commitment_point(this_ptr, encodeArray(val));
                // debug statements here
        }
-       // void FundingCreated_free(struct LDKFundingCreated this_ptr);
-       export function FundingCreated_free(this_ptr: number): void {
+       // struct LDKAcceptChannel AcceptChannel_clone(const struct LDKAcceptChannel *NONNULL_PTR orig);
+       export function AcceptChannel_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.FundingCreated_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.AcceptChannel_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
-       export function FundingCreated_clone(orig: number): number {
+       // void FundingCreated_free(struct LDKFundingCreated this_ptr);
+       export function FundingCreated_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.FundingCreated_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.FundingCreated_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*FundingCreated_get_temporary_channel_id(const struct LDKFundingCreated *NONNULL_PTR this_ptr))[32];
        export function FundingCreated_get_temporary_channel_id(this_ptr: number): Uint8Array {
@@ -5448,21 +7258,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingCreated_new(encodeArray(temporary_channel_id_arg), encodeArray(funding_txid_arg), funding_output_index_arg, encodeArray(signature_arg));
                return nativeResponseValue;
        }
-       // void FundingSigned_free(struct LDKFundingSigned this_ptr);
-       export function FundingSigned_free(this_ptr: number): void {
+       // struct LDKFundingCreated FundingCreated_clone(const struct LDKFundingCreated *NONNULL_PTR orig);
+       export function FundingCreated_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.FundingSigned_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.FundingCreated_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
-       export function FundingSigned_clone(orig: number): number {
+       // void FundingSigned_free(struct LDKFundingSigned this_ptr);
+       export function FundingSigned_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.FundingSigned_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.FundingSigned_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*FundingSigned_get_channel_id(const struct LDKFundingSigned *NONNULL_PTR this_ptr))[32];
        export function FundingSigned_get_channel_id(this_ptr: number): Uint8Array {
@@ -5504,21 +7314,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg));
                return nativeResponseValue;
        }
-       // void FundingLocked_free(struct LDKFundingLocked this_ptr);
-       export function FundingLocked_free(this_ptr: number): void {
+       // struct LDKFundingSigned FundingSigned_clone(const struct LDKFundingSigned *NONNULL_PTR orig);
+       export function FundingSigned_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.FundingLocked_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.FundingSigned_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
-       export function FundingLocked_clone(orig: number): number {
+       // void FundingLocked_free(struct LDKFundingLocked this_ptr);
+       export function FundingLocked_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.FundingLocked_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.FundingLocked_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*FundingLocked_get_channel_id(const struct LDKFundingLocked *NONNULL_PTR this_ptr))[32];
        export function FundingLocked_get_channel_id(this_ptr: number): Uint8Array {
@@ -5560,21 +7370,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingLocked_new(encodeArray(channel_id_arg), encodeArray(next_per_commitment_point_arg));
                return nativeResponseValue;
        }
-       // void Shutdown_free(struct LDKShutdown this_ptr);
-       export function Shutdown_free(this_ptr: number): void {
+       // struct LDKFundingLocked FundingLocked_clone(const struct LDKFundingLocked *NONNULL_PTR orig);
+       export function FundingLocked_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Shutdown_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.FundingLocked_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
-       export function Shutdown_clone(orig: number): number {
+       // void Shutdown_free(struct LDKShutdown this_ptr);
+       export function Shutdown_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Shutdown_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.Shutdown_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*Shutdown_get_channel_id(const struct LDKShutdown *NONNULL_PTR this_ptr))[32];
        export function Shutdown_get_channel_id(this_ptr: number): Uint8Array {
@@ -5616,21 +7426,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Shutdown_new(encodeArray(channel_id_arg), encodeArray(scriptpubkey_arg));
                return nativeResponseValue;
        }
-       // void ClosingSigned_free(struct LDKClosingSigned this_ptr);
-       export function ClosingSigned_free(this_ptr: number): void {
+       // struct LDKShutdown Shutdown_clone(const struct LDKShutdown *NONNULL_PTR orig);
+       export function Shutdown_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ClosingSigned_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.Shutdown_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
-       export function ClosingSigned_clone(orig: number): number {
+       // void ClosingSigned_free(struct LDKClosingSigned this_ptr);
+       export function ClosingSigned_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ClosingSigned_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ClosingSigned_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*ClosingSigned_get_channel_id(const struct LDKClosingSigned *NONNULL_PTR this_ptr))[32];
        export function ClosingSigned_get_channel_id(this_ptr: number): Uint8Array {
@@ -5688,21 +7498,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ClosingSigned_new(encodeArray(channel_id_arg), fee_satoshis_arg, encodeArray(signature_arg));
                return nativeResponseValue;
        }
-       // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_ptr);
-       export function UpdateAddHTLC_free(this_ptr: number): void {
+       // struct LDKClosingSigned ClosingSigned_clone(const struct LDKClosingSigned *NONNULL_PTR orig);
+       export function ClosingSigned_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateAddHTLC_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ClosingSigned_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
-       export function UpdateAddHTLC_clone(orig: number): number {
+       // void UpdateAddHTLC_free(struct LDKUpdateAddHTLC this_ptr);
+       export function UpdateAddHTLC_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UpdateAddHTLC_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UpdateAddHTLC_get_channel_id(const struct LDKUpdateAddHTLC *NONNULL_PTR this_ptr))[32];
        export function UpdateAddHTLC_get_channel_id(this_ptr: number): Uint8Array {
@@ -5784,21 +7594,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateAddHTLC_set_cltv_expiry(this_ptr, val);
                // debug statements here
        }
-       // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_ptr);
-       export function UpdateFulfillHTLC_free(this_ptr: number): void {
+       // struct LDKUpdateAddHTLC UpdateAddHTLC_clone(const struct LDKUpdateAddHTLC *NONNULL_PTR orig);
+       export function UpdateAddHTLC_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UpdateAddHTLC_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
-       export function UpdateFulfillHTLC_clone(orig: number): number {
+       // void UpdateFulfillHTLC_free(struct LDKUpdateFulfillHTLC this_ptr);
+       export function UpdateFulfillHTLC_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UpdateFulfillHTLC_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UpdateFulfillHTLC_get_channel_id(const struct LDKUpdateFulfillHTLC *NONNULL_PTR this_ptr))[32];
        export function UpdateFulfillHTLC_get_channel_id(this_ptr: number): Uint8Array {
@@ -5856,21 +7666,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFulfillHTLC_new(encodeArray(channel_id_arg), htlc_id_arg, encodeArray(payment_preimage_arg));
                return nativeResponseValue;
        }
-       // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_ptr);
-       export function UpdateFailHTLC_free(this_ptr: number): void {
+       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_clone(const struct LDKUpdateFulfillHTLC *NONNULL_PTR orig);
+       export function UpdateFulfillHTLC_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFailHTLC_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UpdateFulfillHTLC_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
-       export function UpdateFailHTLC_clone(orig: number): number {
+       // void UpdateFailHTLC_free(struct LDKUpdateFailHTLC this_ptr);
+       export function UpdateFailHTLC_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UpdateFailHTLC_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UpdateFailHTLC_get_channel_id(const struct LDKUpdateFailHTLC *NONNULL_PTR this_ptr))[32];
        export function UpdateFailHTLC_get_channel_id(this_ptr: number): Uint8Array {
@@ -5904,21 +7714,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFailHTLC_set_htlc_id(this_ptr, val);
                // debug statements here
        }
-       // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_ptr);
-       export function UpdateFailMalformedHTLC_free(this_ptr: number): void {
+       // struct LDKUpdateFailHTLC UpdateFailHTLC_clone(const struct LDKUpdateFailHTLC *NONNULL_PTR orig);
+       export function UpdateFailHTLC_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UpdateFailHTLC_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
-       export function UpdateFailMalformedHTLC_clone(orig: number): number {
+       // void UpdateFailMalformedHTLC_free(struct LDKUpdateFailMalformedHTLC this_ptr);
+       export function UpdateFailMalformedHTLC_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UpdateFailMalformedHTLC_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UpdateFailMalformedHTLC_get_channel_id(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR this_ptr))[32];
        export function UpdateFailMalformedHTLC_get_channel_id(this_ptr: number): Uint8Array {
@@ -5968,21 +7778,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFailMalformedHTLC_set_failure_code(this_ptr, val);
                // debug statements here
        }
-       // void CommitmentSigned_free(struct LDKCommitmentSigned this_ptr);
-       export function CommitmentSigned_free(this_ptr: number): void {
+       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_clone(const struct LDKUpdateFailMalformedHTLC *NONNULL_PTR orig);
+       export function UpdateFailMalformedHTLC_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CommitmentSigned_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UpdateFailMalformedHTLC_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
-       export function CommitmentSigned_clone(orig: number): number {
+       // void CommitmentSigned_free(struct LDKCommitmentSigned this_ptr);
+       export function CommitmentSigned_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CommitmentSigned_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*CommitmentSigned_get_channel_id(const struct LDKCommitmentSigned *NONNULL_PTR this_ptr))[32];
        export function CommitmentSigned_get_channel_id(this_ptr: number): Uint8Array {
@@ -6032,21 +7842,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CommitmentSigned_new(encodeArray(channel_id_arg), encodeArray(signature_arg), htlc_signatures_arg);
                return nativeResponseValue;
        }
-       // void RevokeAndACK_free(struct LDKRevokeAndACK this_ptr);
-       export function RevokeAndACK_free(this_ptr: number): void {
+       // struct LDKCommitmentSigned CommitmentSigned_clone(const struct LDKCommitmentSigned *NONNULL_PTR orig);
+       export function CommitmentSigned_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.RevokeAndACK_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.CommitmentSigned_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
-       export function RevokeAndACK_clone(orig: number): number {
+       // void RevokeAndACK_free(struct LDKRevokeAndACK this_ptr);
+       export function RevokeAndACK_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.RevokeAndACK_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*RevokeAndACK_get_channel_id(const struct LDKRevokeAndACK *NONNULL_PTR this_ptr))[32];
        export function RevokeAndACK_get_channel_id(this_ptr: number): Uint8Array {
@@ -6104,21 +7914,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RevokeAndACK_new(encodeArray(channel_id_arg), encodeArray(per_commitment_secret_arg), encodeArray(next_per_commitment_point_arg));
                return nativeResponseValue;
        }
-       // void UpdateFee_free(struct LDKUpdateFee this_ptr);
-       export function UpdateFee_free(this_ptr: number): void {
+       // struct LDKRevokeAndACK RevokeAndACK_clone(const struct LDKRevokeAndACK *NONNULL_PTR orig);
+       export function RevokeAndACK_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFee_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.RevokeAndACK_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
-       export function UpdateFee_clone(orig: number): number {
+       // void UpdateFee_free(struct LDKUpdateFee this_ptr);
+       export function UpdateFee_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UpdateFee_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UpdateFee_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UpdateFee_get_channel_id(const struct LDKUpdateFee *NONNULL_PTR this_ptr))[32];
        export function UpdateFee_get_channel_id(this_ptr: number): Uint8Array {
@@ -6160,21 +7970,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFee_new(encodeArray(channel_id_arg), feerate_per_kw_arg);
                return nativeResponseValue;
        }
-       // void DataLossProtect_free(struct LDKDataLossProtect this_ptr);
-       export function DataLossProtect_free(this_ptr: number): void {
+       // struct LDKUpdateFee UpdateFee_clone(const struct LDKUpdateFee *NONNULL_PTR orig);
+       export function UpdateFee_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.DataLossProtect_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UpdateFee_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
-       export function DataLossProtect_clone(orig: number): number {
+       // void DataLossProtect_free(struct LDKDataLossProtect this_ptr);
+       export function DataLossProtect_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.DataLossProtect_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.DataLossProtect_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*DataLossProtect_get_your_last_per_commitment_secret(const struct LDKDataLossProtect *NONNULL_PTR this_ptr))[32];
        export function DataLossProtect_get_your_last_per_commitment_secret(this_ptr: number): Uint8Array {
@@ -6216,21 +8026,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.DataLossProtect_new(encodeArray(your_last_per_commitment_secret_arg), encodeArray(my_current_per_commitment_point_arg));
                return nativeResponseValue;
        }
-       // void ChannelReestablish_free(struct LDKChannelReestablish this_ptr);
-       export function ChannelReestablish_free(this_ptr: number): void {
+       // struct LDKDataLossProtect DataLossProtect_clone(const struct LDKDataLossProtect *NONNULL_PTR orig);
+       export function DataLossProtect_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelReestablish_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.DataLossProtect_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
-       export function ChannelReestablish_clone(orig: number): number {
+       // void ChannelReestablish_free(struct LDKChannelReestablish this_ptr);
+       export function ChannelReestablish_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ChannelReestablish_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*ChannelReestablish_get_channel_id(const struct LDKChannelReestablish *NONNULL_PTR this_ptr))[32];
        export function ChannelReestablish_get_channel_id(this_ptr: number): Uint8Array {
@@ -6280,21 +8090,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelReestablish_set_next_remote_commitment_number(this_ptr, val);
                // debug statements here
        }
-       // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_ptr);
-       export function AnnouncementSignatures_free(this_ptr: number): void {
+       // struct LDKChannelReestablish ChannelReestablish_clone(const struct LDKChannelReestablish *NONNULL_PTR orig);
+       export function ChannelReestablish_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.AnnouncementSignatures_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ChannelReestablish_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
-       export function AnnouncementSignatures_clone(orig: number): number {
+       // void AnnouncementSignatures_free(struct LDKAnnouncementSignatures this_ptr);
+       export function AnnouncementSignatures_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.AnnouncementSignatures_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*AnnouncementSignatures_get_channel_id(const struct LDKAnnouncementSignatures *NONNULL_PTR this_ptr))[32];
        export function AnnouncementSignatures_get_channel_id(this_ptr: number): Uint8Array {
@@ -6368,6 +8178,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.AnnouncementSignatures_new(encodeArray(channel_id_arg), short_channel_id_arg, encodeArray(node_signature_arg), encodeArray(bitcoin_signature_arg));
                return nativeResponseValue;
        }
+       // struct LDKAnnouncementSignatures AnnouncementSignatures_clone(const struct LDKAnnouncementSignatures *NONNULL_PTR orig);
+       export function AnnouncementSignatures_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.AnnouncementSignatures_clone(orig);
+               return nativeResponseValue;
+       }
        // void NetAddress_free(struct LDKNetAddress this_ptr);
        export function NetAddress_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -6408,14 +8226,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UnsignedNodeAnnouncement_free(this_ptr);
                // debug statements here
        }
-       // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
-       export function UnsignedNodeAnnouncement_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKNodeFeatures UnsignedNodeAnnouncement_get_features(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR this_ptr);
        export function UnsignedNodeAnnouncement_get_features(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -6504,21 +8314,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UnsignedNodeAnnouncement_set_addresses(this_ptr, val);
                // debug statements here
        }
-       // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_ptr);
-       export function NodeAnnouncement_free(this_ptr: number): void {
+       // struct LDKUnsignedNodeAnnouncement UnsignedNodeAnnouncement_clone(const struct LDKUnsignedNodeAnnouncement *NONNULL_PTR orig);
+       export function UnsignedNodeAnnouncement_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.NodeAnnouncement_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UnsignedNodeAnnouncement_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
-       export function NodeAnnouncement_clone(orig: number): number {
+       // void NodeAnnouncement_free(struct LDKNodeAnnouncement this_ptr);
+       export function NodeAnnouncement_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.NodeAnnouncement_free(this_ptr);
+               // debug statements here
        }
        // struct LDKSignature NodeAnnouncement_get_signature(const struct LDKNodeAnnouncement *NONNULL_PTR this_ptr);
        export function NodeAnnouncement_get_signature(this_ptr: number): Uint8Array {
@@ -6560,21 +8370,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeAnnouncement_new(encodeArray(signature_arg), contents_arg);
                return nativeResponseValue;
        }
-       // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_ptr);
-       export function UnsignedChannelAnnouncement_free(this_ptr: number): void {
+       // struct LDKNodeAnnouncement NodeAnnouncement_clone(const struct LDKNodeAnnouncement *NONNULL_PTR orig);
+       export function NodeAnnouncement_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.NodeAnnouncement_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
-       export function UnsignedChannelAnnouncement_clone(orig: number): number {
+       // void UnsignedChannelAnnouncement_free(struct LDKUnsignedChannelAnnouncement this_ptr);
+       export function UnsignedChannelAnnouncement_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UnsignedChannelAnnouncement_free(this_ptr);
+               // debug statements here
        }
        // struct LDKChannelFeatures UnsignedChannelAnnouncement_get_features(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR this_ptr);
        export function UnsignedChannelAnnouncement_get_features(this_ptr: number): number {
@@ -6688,21 +8498,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UnsignedChannelAnnouncement_set_bitcoin_key_2(this_ptr, encodeArray(val));
                // debug statements here
        }
-       // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_ptr);
-       export function ChannelAnnouncement_free(this_ptr: number): void {
+       // struct LDKUnsignedChannelAnnouncement UnsignedChannelAnnouncement_clone(const struct LDKUnsignedChannelAnnouncement *NONNULL_PTR orig);
+       export function UnsignedChannelAnnouncement_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelAnnouncement_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UnsignedChannelAnnouncement_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
-       export function ChannelAnnouncement_clone(orig: number): number {
+       // void ChannelAnnouncement_free(struct LDKChannelAnnouncement this_ptr);
+       export function ChannelAnnouncement_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ChannelAnnouncement_free(this_ptr);
+               // debug statements here
        }
        // struct LDKSignature ChannelAnnouncement_get_node_signature_1(const struct LDKChannelAnnouncement *NONNULL_PTR this_ptr);
        export function ChannelAnnouncement_get_node_signature_1(this_ptr: number): Uint8Array {
@@ -6792,21 +8602,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelAnnouncement_new(encodeArray(node_signature_1_arg), encodeArray(node_signature_2_arg), encodeArray(bitcoin_signature_1_arg), encodeArray(bitcoin_signature_2_arg), contents_arg);
                return nativeResponseValue;
        }
-       // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_ptr);
-       export function UnsignedChannelUpdate_free(this_ptr: number): void {
+       // struct LDKChannelAnnouncement ChannelAnnouncement_clone(const struct LDKChannelAnnouncement *NONNULL_PTR orig);
+       export function ChannelAnnouncement_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ChannelAnnouncement_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
-       export function UnsignedChannelUpdate_clone(orig: number): number {
+       // void UnsignedChannelUpdate_free(struct LDKUnsignedChannelUpdate this_ptr);
+       export function UnsignedChannelUpdate_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.UnsignedChannelUpdate_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*UnsignedChannelUpdate_get_chain_hash(const struct LDKUnsignedChannelUpdate *NONNULL_PTR this_ptr))[32];
        export function UnsignedChannelUpdate_get_chain_hash(this_ptr: number): Uint8Array {
@@ -6936,21 +8746,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UnsignedChannelUpdate_set_fee_proportional_millionths(this_ptr, val);
                // debug statements here
        }
-       // void ChannelUpdate_free(struct LDKChannelUpdate this_ptr);
-       export function ChannelUpdate_free(this_ptr: number): void {
+       // struct LDKUnsignedChannelUpdate UnsignedChannelUpdate_clone(const struct LDKUnsignedChannelUpdate *NONNULL_PTR orig);
+       export function UnsignedChannelUpdate_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelUpdate_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.UnsignedChannelUpdate_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
-       export function ChannelUpdate_clone(orig: number): number {
+       // void ChannelUpdate_free(struct LDKChannelUpdate this_ptr);
+       export function ChannelUpdate_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ChannelUpdate_free(this_ptr);
+               // debug statements here
        }
        // struct LDKSignature ChannelUpdate_get_signature(const struct LDKChannelUpdate *NONNULL_PTR this_ptr);
        export function ChannelUpdate_get_signature(this_ptr: number): Uint8Array {
@@ -6992,21 +8802,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelUpdate_new(encodeArray(signature_arg), contents_arg);
                return nativeResponseValue;
        }
-       // void QueryChannelRange_free(struct LDKQueryChannelRange this_ptr);
-       export function QueryChannelRange_free(this_ptr: number): void {
+       // struct LDKChannelUpdate ChannelUpdate_clone(const struct LDKChannelUpdate *NONNULL_PTR orig);
+       export function ChannelUpdate_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.QueryChannelRange_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ChannelUpdate_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
-       export function QueryChannelRange_clone(orig: number): number {
+       // void QueryChannelRange_free(struct LDKQueryChannelRange this_ptr);
+       export function QueryChannelRange_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.QueryChannelRange_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*QueryChannelRange_get_chain_hash(const struct LDKQueryChannelRange *NONNULL_PTR this_ptr))[32];
        export function QueryChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
@@ -7064,21 +8874,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.QueryChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg);
                return nativeResponseValue;
        }
-       // void ReplyChannelRange_free(struct LDKReplyChannelRange this_ptr);
-       export function ReplyChannelRange_free(this_ptr: number): void {
+       // struct LDKQueryChannelRange QueryChannelRange_clone(const struct LDKQueryChannelRange *NONNULL_PTR orig);
+       export function QueryChannelRange_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyChannelRange_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.QueryChannelRange_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
-       export function ReplyChannelRange_clone(orig: number): number {
+       // void ReplyChannelRange_free(struct LDKReplyChannelRange this_ptr);
+       export function ReplyChannelRange_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ReplyChannelRange_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*ReplyChannelRange_get_chain_hash(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr))[32];
        export function ReplyChannelRange_get_chain_hash(this_ptr: number): Uint8Array {
@@ -7128,20 +8938,20 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ReplyChannelRange_set_number_of_blocks(this_ptr, val);
                // debug statements here
        }
-       // bool ReplyChannelRange_get_full_information(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
-       export function ReplyChannelRange_get_full_information(this_ptr: number): boolean {
+       // bool ReplyChannelRange_get_sync_complete(const struct LDKReplyChannelRange *NONNULL_PTR this_ptr);
+       export function ReplyChannelRange_get_sync_complete(this_ptr: number): boolean {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyChannelRange_get_full_information(this_ptr);
+               const nativeResponseValue = wasm.ReplyChannelRange_get_sync_complete(this_ptr);
                return nativeResponseValue;
        }
-       // void ReplyChannelRange_set_full_information(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
-       export function ReplyChannelRange_set_full_information(this_ptr: number, val: boolean): void {
+       // void ReplyChannelRange_set_sync_complete(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, bool val);
+       export function ReplyChannelRange_set_sync_complete(this_ptr: number, val: boolean): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyChannelRange_set_full_information(this_ptr, val);
+               const nativeResponseValue = wasm.ReplyChannelRange_set_sync_complete(this_ptr, val);
                // debug statements here
        }
        // void ReplyChannelRange_set_short_channel_ids(struct LDKReplyChannelRange *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
@@ -7152,29 +8962,29 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ReplyChannelRange_set_short_channel_ids(this_ptr, val);
                // debug statements here
        }
-       // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool full_information_arg, struct LDKCVec_u64Z short_channel_ids_arg);
-       export function ReplyChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number, full_information_arg: boolean, short_channel_ids_arg: number[]): number {
+       // MUST_USE_RES struct LDKReplyChannelRange ReplyChannelRange_new(struct LDKThirtyTwoBytes chain_hash_arg, uint32_t first_blocknum_arg, uint32_t number_of_blocks_arg, bool sync_complete_arg, struct LDKCVec_u64Z short_channel_ids_arg);
+       export function ReplyChannelRange_new(chain_hash_arg: Uint8Array, first_blocknum_arg: number, number_of_blocks_arg: number, sync_complete_arg: boolean, short_channel_ids_arg: number[]): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg);
+               const nativeResponseValue = wasm.ReplyChannelRange_new(encodeArray(chain_hash_arg), first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
                return nativeResponseValue;
        }
-       // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_ptr);
-       export function QueryShortChannelIds_free(this_ptr: number): void {
+       // struct LDKReplyChannelRange ReplyChannelRange_clone(const struct LDKReplyChannelRange *NONNULL_PTR orig);
+       export function ReplyChannelRange_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.QueryShortChannelIds_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ReplyChannelRange_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
-       export function QueryShortChannelIds_clone(orig: number): number {
+       // void QueryShortChannelIds_free(struct LDKQueryShortChannelIds this_ptr);
+       export function QueryShortChannelIds_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.QueryShortChannelIds_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*QueryShortChannelIds_get_chain_hash(const struct LDKQueryShortChannelIds *NONNULL_PTR this_ptr))[32];
        export function QueryShortChannelIds_get_chain_hash(this_ptr: number): Uint8Array {
@@ -7208,21 +9018,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.QueryShortChannelIds_new(encodeArray(chain_hash_arg), short_channel_ids_arg);
                return nativeResponseValue;
        }
-       // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_ptr);
-       export function ReplyShortChannelIdsEnd_free(this_ptr: number): void {
+       // struct LDKQueryShortChannelIds QueryShortChannelIds_clone(const struct LDKQueryShortChannelIds *NONNULL_PTR orig);
+       export function QueryShortChannelIds_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.QueryShortChannelIds_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
-       export function ReplyShortChannelIdsEnd_clone(orig: number): number {
+       // void ReplyShortChannelIdsEnd_free(struct LDKReplyShortChannelIdsEnd this_ptr);
+       export function ReplyShortChannelIdsEnd_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*ReplyShortChannelIdsEnd_get_chain_hash(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR this_ptr))[32];
        export function ReplyShortChannelIdsEnd_get_chain_hash(this_ptr: number): Uint8Array {
@@ -7264,21 +9074,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_new(encodeArray(chain_hash_arg), full_information_arg);
                return nativeResponseValue;
        }
-       // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_ptr);
-       export function GossipTimestampFilter_free(this_ptr: number): void {
+       // struct LDKReplyShortChannelIdsEnd ReplyShortChannelIdsEnd_clone(const struct LDKReplyShortChannelIdsEnd *NONNULL_PTR orig);
+       export function ReplyShortChannelIdsEnd_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.GossipTimestampFilter_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.ReplyShortChannelIdsEnd_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
-       export function GossipTimestampFilter_clone(orig: number): number {
+       // void GossipTimestampFilter_free(struct LDKGossipTimestampFilter this_ptr);
+       export function GossipTimestampFilter_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.GossipTimestampFilter_free(this_ptr);
+               // debug statements here
        }
        // const uint8_t (*GossipTimestampFilter_get_chain_hash(const struct LDKGossipTimestampFilter *NONNULL_PTR this_ptr))[32];
        export function GossipTimestampFilter_get_chain_hash(this_ptr: number): Uint8Array {
@@ -7336,6 +9146,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.GossipTimestampFilter_new(encodeArray(chain_hash_arg), first_timestamp_arg, timestamp_range_arg);
                return nativeResponseValue;
        }
+       // struct LDKGossipTimestampFilter GossipTimestampFilter_clone(const struct LDKGossipTimestampFilter *NONNULL_PTR orig);
+       export function GossipTimestampFilter_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.GossipTimestampFilter_clone(orig);
+               return nativeResponseValue;
+       }
        // void ErrorAction_free(struct LDKErrorAction this_ptr);
        export function ErrorAction_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -7360,14 +9178,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.LightningError_free(this_ptr);
                // debug statements here
        }
-       // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
-       export function LightningError_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.LightningError_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKStr LightningError_get_err(const struct LDKLightningError *NONNULL_PTR this_ptr);
        export function LightningError_get_err(this_ptr: number): String {
                if(!isWasmInitialized) {
@@ -7408,21 +9218,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.LightningError_new(encodeArray(err_arg), action_arg);
                return nativeResponseValue;
        }
-       // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_ptr);
-       export function CommitmentUpdate_free(this_ptr: number): void {
+       // struct LDKLightningError LightningError_clone(const struct LDKLightningError *NONNULL_PTR orig);
+       export function LightningError_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CommitmentUpdate_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.LightningError_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
-       export function CommitmentUpdate_clone(orig: number): number {
+       // void CommitmentUpdate_free(struct LDKCommitmentUpdate this_ptr);
+       export function CommitmentUpdate_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.CommitmentUpdate_free(this_ptr);
+               // debug statements here
        }
        // void CommitmentUpdate_set_update_add_htlcs(struct LDKCommitmentUpdate *NONNULL_PTR this_ptr, struct LDKCVec_UpdateAddHTLCZ val);
        export function CommitmentUpdate_set_update_add_htlcs(this_ptr: number, val: number[]): void {
@@ -7496,6 +9306,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CommitmentUpdate_new(update_add_htlcs_arg, update_fulfill_htlcs_arg, update_fail_htlcs_arg, update_fail_malformed_htlcs_arg, update_fee_arg, commitment_signed_arg);
                return nativeResponseValue;
        }
+       // struct LDKCommitmentUpdate CommitmentUpdate_clone(const struct LDKCommitmentUpdate *NONNULL_PTR orig);
+       export function CommitmentUpdate_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CommitmentUpdate_clone(orig);
+               return nativeResponseValue;
+       }
        // void HTLCFailChannelUpdate_free(struct LDKHTLCFailChannelUpdate this_ptr);
        export function HTLCFailChannelUpdate_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -7536,7 +9354,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.AcceptChannel_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKAcceptChannel AcceptChannel_read(struct LDKu8slice ser);
+       // struct LDKCResult_AcceptChannelDecodeErrorZ AcceptChannel_read(struct LDKu8slice ser);
        export function AcceptChannel_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7552,7 +9370,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.AnnouncementSignatures_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKAnnouncementSignatures AnnouncementSignatures_read(struct LDKu8slice ser);
+       // struct LDKCResult_AnnouncementSignaturesDecodeErrorZ AnnouncementSignatures_read(struct LDKu8slice ser);
        export function AnnouncementSignatures_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7584,7 +9402,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ClosingSigned_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKClosingSigned ClosingSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_ClosingSignedDecodeErrorZ ClosingSigned_read(struct LDKu8slice ser);
        export function ClosingSigned_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7600,7 +9418,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CommitmentSigned_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKCommitmentSigned CommitmentSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_CommitmentSignedDecodeErrorZ CommitmentSigned_read(struct LDKu8slice ser);
        export function CommitmentSigned_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7616,7 +9434,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingCreated_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKFundingCreated FundingCreated_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingCreatedDecodeErrorZ FundingCreated_read(struct LDKu8slice ser);
        export function FundingCreated_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7632,7 +9450,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingSigned_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKFundingSigned FundingSigned_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingSignedDecodeErrorZ FundingSigned_read(struct LDKu8slice ser);
        export function FundingSigned_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7648,7 +9466,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.FundingLocked_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKFundingLocked FundingLocked_read(struct LDKu8slice ser);
+       // struct LDKCResult_FundingLockedDecodeErrorZ FundingLocked_read(struct LDKu8slice ser);
        export function FundingLocked_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7680,7 +9498,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.OpenChannel_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKOpenChannel OpenChannel_read(struct LDKu8slice ser);
+       // struct LDKCResult_OpenChannelDecodeErrorZ OpenChannel_read(struct LDKu8slice ser);
        export function OpenChannel_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7696,7 +9514,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RevokeAndACK_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKRevokeAndACK RevokeAndACK_read(struct LDKu8slice ser);
+       // struct LDKCResult_RevokeAndACKDecodeErrorZ RevokeAndACK_read(struct LDKu8slice ser);
        export function RevokeAndACK_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7712,7 +9530,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Shutdown_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKShutdown Shutdown_read(struct LDKu8slice ser);
+       // struct LDKCResult_ShutdownDecodeErrorZ Shutdown_read(struct LDKu8slice ser);
        export function Shutdown_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7728,7 +9546,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFailHTLC_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKUpdateFailHTLC UpdateFailHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFailHTLCDecodeErrorZ UpdateFailHTLC_read(struct LDKu8slice ser);
        export function UpdateFailHTLC_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7744,7 +9562,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFailMalformedHTLC_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKUpdateFailMalformedHTLC UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ UpdateFailMalformedHTLC_read(struct LDKu8slice ser);
        export function UpdateFailMalformedHTLC_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7760,7 +9578,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFee_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKUpdateFee UpdateFee_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFeeDecodeErrorZ UpdateFee_read(struct LDKu8slice ser);
        export function UpdateFee_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7776,7 +9594,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateFulfillHTLC_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKUpdateFulfillHTLC UpdateFulfillHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateFulfillHTLCDecodeErrorZ UpdateFulfillHTLC_read(struct LDKu8slice ser);
        export function UpdateFulfillHTLC_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7792,7 +9610,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.UpdateAddHTLC_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKUpdateAddHTLC UpdateAddHTLC_read(struct LDKu8slice ser);
+       // struct LDKCResult_UpdateAddHTLCDecodeErrorZ UpdateAddHTLC_read(struct LDKu8slice ser);
        export function UpdateAddHTLC_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7856,7 +9674,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelAnnouncement_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelAnnouncement ChannelAnnouncement_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelAnnouncementDecodeErrorZ ChannelAnnouncement_read(struct LDKu8slice ser);
        export function ChannelAnnouncement_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7888,7 +9706,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelUpdate_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelUpdate ChannelUpdate_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelUpdateDecodeErrorZ ChannelUpdate_read(struct LDKu8slice ser);
        export function ChannelUpdate_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -7936,7 +9754,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeAnnouncement_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKNodeAnnouncement NodeAnnouncement_read(struct LDKu8slice ser);
+       // struct LDKCResult_NodeAnnouncementDecodeErrorZ NodeAnnouncement_read(struct LDKu8slice ser);
        export function NodeAnnouncement_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8024,6 +9842,70 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.GossipTimestampFilter_write(obj);
                return decodeArray(nativeResponseValue);
        }
+       // void IgnoringMessageHandler_free(struct LDKIgnoringMessageHandler this_ptr);
+       export function IgnoringMessageHandler_free(this_ptr: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.IgnoringMessageHandler_free(this_ptr);
+               // debug statements here
+       }
+       // MUST_USE_RES struct LDKIgnoringMessageHandler IgnoringMessageHandler_new(void);
+       export function IgnoringMessageHandler_new(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.IgnoringMessageHandler_new();
+               return nativeResponseValue;
+       }
+       // struct LDKMessageSendEventsProvider IgnoringMessageHandler_as_MessageSendEventsProvider(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+       export function IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.IgnoringMessageHandler_as_MessageSendEventsProvider(this_arg);
+               return nativeResponseValue;
+       }
+       // struct LDKRoutingMessageHandler IgnoringMessageHandler_as_RoutingMessageHandler(const struct LDKIgnoringMessageHandler *NONNULL_PTR this_arg);
+       export function IgnoringMessageHandler_as_RoutingMessageHandler(this_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.IgnoringMessageHandler_as_RoutingMessageHandler(this_arg);
+               return nativeResponseValue;
+       }
+       // void ErroringMessageHandler_free(struct LDKErroringMessageHandler this_ptr);
+       export function ErroringMessageHandler_free(this_ptr: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ErroringMessageHandler_free(this_ptr);
+               // debug statements here
+       }
+       // MUST_USE_RES struct LDKErroringMessageHandler ErroringMessageHandler_new(void);
+       export function ErroringMessageHandler_new(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ErroringMessageHandler_new();
+               return nativeResponseValue;
+       }
+       // struct LDKMessageSendEventsProvider ErroringMessageHandler_as_MessageSendEventsProvider(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
+       export function ErroringMessageHandler_as_MessageSendEventsProvider(this_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ErroringMessageHandler_as_MessageSendEventsProvider(this_arg);
+               return nativeResponseValue;
+       }
+       // struct LDKChannelMessageHandler ErroringMessageHandler_as_ChannelMessageHandler(const struct LDKErroringMessageHandler *NONNULL_PTR this_arg);
+       export function ErroringMessageHandler_as_ChannelMessageHandler(this_arg: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ErroringMessageHandler_as_ChannelMessageHandler(this_arg);
+               return nativeResponseValue;
+       }
        // void MessageHandler_free(struct LDKMessageHandler this_ptr);
        export function MessageHandler_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -8096,14 +9978,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.PeerHandleError_free(this_ptr);
                // debug statements here
        }
-       // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
-       export function PeerHandleError_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.PeerHandleError_clone(orig);
-               return nativeResponseValue;
-       }
        // bool PeerHandleError_get_no_connection_possible(const struct LDKPeerHandleError *NONNULL_PTR this_ptr);
        export function PeerHandleError_get_no_connection_possible(this_ptr: number): boolean {
                if(!isWasmInitialized) {
@@ -8128,6 +10002,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.PeerHandleError_new(no_connection_possible_arg);
                return nativeResponseValue;
        }
+       // struct LDKPeerHandleError PeerHandleError_clone(const struct LDKPeerHandleError *NONNULL_PTR orig);
+       export function PeerHandleError_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.PeerHandleError_clone(orig);
+               return nativeResponseValue;
+       }
        // void PeerManager_free(struct LDKPeerManager this_ptr);
        export function PeerManager_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -8224,7 +10106,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.build_commitment_secret(encodeArray(commitment_seed), idx);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKCResult_SecretKeySecpErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
+       // struct LDKCResult_SecretKeyErrorZ derive_private_key(struct LDKPublicKey per_commitment_point, const uint8_t (*base_secret)[32]);
        export function derive_private_key(per_commitment_point: Uint8Array, base_secret: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8232,7 +10114,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.derive_private_key(encodeArray(per_commitment_point), encodeArray(base_secret));
                return nativeResponseValue;
        }
-       // struct LDKCResult_PublicKeySecpErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
+       // struct LDKCResult_PublicKeyErrorZ derive_public_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey base_point);
        export function derive_public_key(per_commitment_point: Uint8Array, base_point: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8240,7 +10122,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.derive_public_key(encodeArray(per_commitment_point), encodeArray(base_point));
                return nativeResponseValue;
        }
-       // struct LDKCResult_SecretKeySecpErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
+       // struct LDKCResult_SecretKeyErrorZ derive_private_revocation_key(const uint8_t (*per_commitment_secret)[32], const uint8_t (*countersignatory_revocation_base_secret)[32]);
        export function derive_private_revocation_key(per_commitment_secret: Uint8Array, countersignatory_revocation_base_secret: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8248,7 +10130,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.derive_private_revocation_key(encodeArray(per_commitment_secret), encodeArray(countersignatory_revocation_base_secret));
                return nativeResponseValue;
        }
-       // struct LDKCResult_PublicKeySecpErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
+       // struct LDKCResult_PublicKeyErrorZ derive_public_revocation_key(struct LDKPublicKey per_commitment_point, struct LDKPublicKey countersignatory_revocation_base_point);
        export function derive_public_revocation_key(per_commitment_point: Uint8Array, countersignatory_revocation_base_point: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8264,14 +10146,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.TxCreationKeys_free(this_ptr);
                // debug statements here
        }
-       // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
-       export function TxCreationKeys_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKPublicKey TxCreationKeys_get_per_commitment_point(const struct LDKTxCreationKeys *NONNULL_PTR this_ptr);
        export function TxCreationKeys_get_per_commitment_point(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8360,6 +10234,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.TxCreationKeys_new(encodeArray(per_commitment_point_arg), encodeArray(revocation_key_arg), encodeArray(broadcaster_htlc_key_arg), encodeArray(countersignatory_htlc_key_arg), encodeArray(broadcaster_delayed_payment_key_arg));
                return nativeResponseValue;
        }
+       // struct LDKTxCreationKeys TxCreationKeys_clone(const struct LDKTxCreationKeys *NONNULL_PTR orig);
+       export function TxCreationKeys_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.TxCreationKeys_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z TxCreationKeys_write(const struct LDKTxCreationKeys *NONNULL_PTR obj);
        export function TxCreationKeys_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8368,7 +10250,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.TxCreationKeys_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKTxCreationKeys TxCreationKeys_read(struct LDKu8slice ser);
+       // struct LDKCResult_TxCreationKeysDecodeErrorZ TxCreationKeys_read(struct LDKu8slice ser);
        export function TxCreationKeys_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8384,14 +10266,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelPublicKeys_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
-       export function ChannelPublicKeys_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKPublicKey ChannelPublicKeys_get_funding_pubkey(const struct LDKChannelPublicKeys *NONNULL_PTR this_ptr);
        export function ChannelPublicKeys_get_funding_pubkey(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8480,6 +10354,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelPublicKeys_new(encodeArray(funding_pubkey_arg), encodeArray(revocation_basepoint_arg), encodeArray(payment_point_arg), encodeArray(delayed_payment_basepoint_arg), encodeArray(htlc_basepoint_arg));
                return nativeResponseValue;
        }
+       // struct LDKChannelPublicKeys ChannelPublicKeys_clone(const struct LDKChannelPublicKeys *NONNULL_PTR orig);
+       export function ChannelPublicKeys_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelPublicKeys_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z ChannelPublicKeys_write(const struct LDKChannelPublicKeys *NONNULL_PTR obj);
        export function ChannelPublicKeys_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8488,7 +10370,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelPublicKeys_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelPublicKeys ChannelPublicKeys_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelPublicKeysDecodeErrorZ ChannelPublicKeys_read(struct LDKu8slice ser);
        export function ChannelPublicKeys_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8496,7 +10378,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelPublicKeys_read(encodeArray(ser));
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
+       // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_derive_new(struct LDKPublicKey per_commitment_point, struct LDKPublicKey broadcaster_delayed_payment_base, struct LDKPublicKey broadcaster_htlc_base, struct LDKPublicKey countersignatory_revocation_base, struct LDKPublicKey countersignatory_htlc_base);
        export function TxCreationKeys_derive_new(per_commitment_point: Uint8Array, broadcaster_delayed_payment_base: Uint8Array, broadcaster_htlc_base: Uint8Array, countersignatory_revocation_base: Uint8Array, countersignatory_htlc_base: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8504,7 +10386,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.TxCreationKeys_derive_new(encodeArray(per_commitment_point), encodeArray(broadcaster_delayed_payment_base), encodeArray(broadcaster_htlc_base), encodeArray(countersignatory_revocation_base), encodeArray(countersignatory_htlc_base));
                return nativeResponseValue;
        }
-       // MUST_USE_RES struct LDKCResult_TxCreationKeysSecpErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
+       // MUST_USE_RES struct LDKCResult_TxCreationKeysErrorZ TxCreationKeys_from_channel_static_keys(struct LDKPublicKey per_commitment_point, const struct LDKChannelPublicKeys *NONNULL_PTR broadcaster_keys, const struct LDKChannelPublicKeys *NONNULL_PTR countersignatory_keys);
        export function TxCreationKeys_from_channel_static_keys(per_commitment_point: Uint8Array, broadcaster_keys: number, countersignatory_keys: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8528,14 +10410,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HTLCOutputInCommitment_free(this_ptr);
                // debug statements here
        }
-       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
-       export function HTLCOutputInCommitment_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
-               return nativeResponseValue;
-       }
        // bool HTLCOutputInCommitment_get_offered(const struct LDKHTLCOutputInCommitment *NONNULL_PTR this_ptr);
        export function HTLCOutputInCommitment_get_offered(this_ptr: number): boolean {
                if(!isWasmInitialized) {
@@ -8600,6 +10474,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HTLCOutputInCommitment_set_payment_hash(this_ptr, encodeArray(val));
                // debug statements here
        }
+       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_clone(const struct LDKHTLCOutputInCommitment *NONNULL_PTR orig);
+       export function HTLCOutputInCommitment_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.HTLCOutputInCommitment_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z HTLCOutputInCommitment_write(const struct LDKHTLCOutputInCommitment *NONNULL_PTR obj);
        export function HTLCOutputInCommitment_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8608,7 +10490,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HTLCOutputInCommitment_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKHTLCOutputInCommitment HTLCOutputInCommitment_read(struct LDKu8slice ser);
+       // struct LDKCResult_HTLCOutputInCommitmentDecodeErrorZ HTLCOutputInCommitment_read(struct LDKu8slice ser);
        export function HTLCOutputInCommitment_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8648,14 +10530,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelTransactionParameters_free(this_ptr);
                // debug statements here
        }
-       // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
-       export function ChannelTransactionParameters_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKChannelPublicKeys ChannelTransactionParameters_get_holder_pubkeys(const struct LDKChannelTransactionParameters *NONNULL_PTR this_ptr);
        export function ChannelTransactionParameters_get_holder_pubkeys(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -8741,7 +10615,15 @@ public static native long new_empty_slice_vec();
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
+               const nativeResponseValue = wasm.ChannelTransactionParameters_new(holder_pubkeys_arg, holder_selected_contest_delay_arg, is_outbound_from_holder_arg, counterparty_parameters_arg, funding_outpoint_arg);
+               return nativeResponseValue;
+       }
+       // struct LDKChannelTransactionParameters ChannelTransactionParameters_clone(const struct LDKChannelTransactionParameters *NONNULL_PTR orig);
+       export function ChannelTransactionParameters_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelTransactionParameters_clone(orig);
                return nativeResponseValue;
        }
        // void CounterpartyChannelTransactionParameters_free(struct LDKCounterpartyChannelTransactionParameters this_ptr);
@@ -8752,14 +10634,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_free(this_ptr);
                // debug statements here
        }
-       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
-       export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKChannelPublicKeys CounterpartyChannelTransactionParameters_get_pubkeys(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR this_ptr);
        export function CounterpartyChannelTransactionParameters_get_pubkeys(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -8800,6 +10674,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_new(pubkeys_arg, selected_contest_delay_arg);
                return nativeResponseValue;
        }
+       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_clone(const struct LDKCounterpartyChannelTransactionParameters *NONNULL_PTR orig);
+       export function CounterpartyChannelTransactionParameters_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_clone(orig);
+               return nativeResponseValue;
+       }
        // MUST_USE_RES bool ChannelTransactionParameters_is_populated(const struct LDKChannelTransactionParameters *NONNULL_PTR this_arg);
        export function ChannelTransactionParameters_is_populated(this_arg: number): boolean {
                if(!isWasmInitialized) {
@@ -8832,7 +10714,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CounterpartyChannelTransactionParameters_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKCounterpartyChannelTransactionParameters CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
+       // struct LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ CounterpartyChannelTransactionParameters_read(struct LDKu8slice ser);
        export function CounterpartyChannelTransactionParameters_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8848,7 +10730,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelTransactionParameters_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelTransactionParameters ChannelTransactionParameters_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelTransactionParametersDecodeErrorZ ChannelTransactionParameters_read(struct LDKu8slice ser);
        export function ChannelTransactionParameters_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8912,14 +10794,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HolderCommitmentTransaction_free(this_ptr);
                // debug statements here
        }
-       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
-       export function HolderCommitmentTransaction_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKSignature HolderCommitmentTransaction_get_counterparty_sig(const struct LDKHolderCommitmentTransaction *NONNULL_PTR this_ptr);
        export function HolderCommitmentTransaction_get_counterparty_sig(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8944,6 +10818,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this_ptr, val);
                // debug statements here
        }
+       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_clone(const struct LDKHolderCommitmentTransaction *NONNULL_PTR orig);
+       export function HolderCommitmentTransaction_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.HolderCommitmentTransaction_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z HolderCommitmentTransaction_write(const struct LDKHolderCommitmentTransaction *NONNULL_PTR obj);
        export function HolderCommitmentTransaction_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -8952,7 +10834,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.HolderCommitmentTransaction_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKHolderCommitmentTransaction HolderCommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_HolderCommitmentTransactionDecodeErrorZ HolderCommitmentTransaction_read(struct LDKu8slice ser);
        export function HolderCommitmentTransaction_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -8976,14 +10858,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.BuiltCommitmentTransaction_free(this_ptr);
                // debug statements here
        }
-       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
-       export function BuiltCommitmentTransaction_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKTransaction BuiltCommitmentTransaction_get_transaction(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR this_ptr);
        export function BuiltCommitmentTransaction_get_transaction(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9024,6 +10898,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.BuiltCommitmentTransaction_new(encodeArray(transaction_arg), encodeArray(txid_arg));
                return nativeResponseValue;
        }
+       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_clone(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR orig);
+       export function BuiltCommitmentTransaction_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.BuiltCommitmentTransaction_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z BuiltCommitmentTransaction_write(const struct LDKBuiltCommitmentTransaction *NONNULL_PTR obj);
        export function BuiltCommitmentTransaction_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9032,7 +10914,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.BuiltCommitmentTransaction_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKBuiltCommitmentTransaction BuiltCommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_BuiltCommitmentTransactionDecodeErrorZ BuiltCommitmentTransaction_read(struct LDKu8slice ser);
        export function BuiltCommitmentTransaction_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -9080,7 +10962,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.CommitmentTransaction_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKCommitmentTransaction CommitmentTransaction_read(struct LDKu8slice ser);
+       // struct LDKCResult_CommitmentTransactionDecodeErrorZ CommitmentTransaction_read(struct LDKu8slice ser);
        export function CommitmentTransaction_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -9184,6 +11066,30 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.get_commitment_transaction_number_obscure_factor(encodeArray(broadcaster_payment_basepoint), encodeArray(countersignatory_payment_basepoint), outbound_from_broadcaster);
                return nativeResponseValue;
        }
+       // struct LDKInitFeatures InitFeatures_clone(const struct LDKInitFeatures *NONNULL_PTR orig);
+       export function InitFeatures_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.InitFeatures_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKNodeFeatures NodeFeatures_clone(const struct LDKNodeFeatures *NONNULL_PTR orig);
+       export function NodeFeatures_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeFeatures_clone(orig);
+               return nativeResponseValue;
+       }
+       // struct LDKChannelFeatures ChannelFeatures_clone(const struct LDKChannelFeatures *NONNULL_PTR orig);
+       export function ChannelFeatures_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelFeatures_clone(orig);
+               return nativeResponseValue;
+       }
        // void InitFeatures_free(struct LDKInitFeatures this_ptr);
        export function InitFeatures_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -9208,22 +11114,110 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelFeatures_free(this_ptr);
                // debug statements here
        }
-       // void RouteHop_free(struct LDKRouteHop this_ptr);
-       export function RouteHop_free(this_ptr: number): void {
+       // MUST_USE_RES struct LDKInitFeatures InitFeatures_empty(void);
+       export function InitFeatures_empty(): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.RouteHop_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.InitFeatures_empty();
+               return nativeResponseValue;
        }
-       // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
-       export function RouteHop_clone(orig: number): number {
+       // MUST_USE_RES struct LDKInitFeatures InitFeatures_known(void);
+       export function InitFeatures_known(): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.RouteHop_clone(orig);
+               const nativeResponseValue = wasm.InitFeatures_known();
+               return nativeResponseValue;
+       }
+       // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_empty(void);
+       export function NodeFeatures_empty(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeFeatures_empty();
+               return nativeResponseValue;
+       }
+       // MUST_USE_RES struct LDKNodeFeatures NodeFeatures_known(void);
+       export function NodeFeatures_known(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeFeatures_known();
+               return nativeResponseValue;
+       }
+       // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_empty(void);
+       export function ChannelFeatures_empty(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelFeatures_empty();
+               return nativeResponseValue;
+       }
+       // MUST_USE_RES struct LDKChannelFeatures ChannelFeatures_known(void);
+       export function ChannelFeatures_known(): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelFeatures_known();
+               return nativeResponseValue;
+       }
+       // struct LDKCVec_u8Z InitFeatures_write(const struct LDKInitFeatures *NONNULL_PTR obj);
+       export function InitFeatures_write(obj: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.InitFeatures_write(obj);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKCVec_u8Z NodeFeatures_write(const struct LDKNodeFeatures *NONNULL_PTR obj);
+       export function NodeFeatures_write(obj: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeFeatures_write(obj);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKCVec_u8Z ChannelFeatures_write(const struct LDKChannelFeatures *NONNULL_PTR obj);
+       export function ChannelFeatures_write(obj: number): Uint8Array {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelFeatures_write(obj);
+               return decodeArray(nativeResponseValue);
+       }
+       // struct LDKCResult_InitFeaturesDecodeErrorZ InitFeatures_read(struct LDKu8slice ser);
+       export function InitFeatures_read(ser: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.InitFeatures_read(encodeArray(ser));
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_NodeFeaturesDecodeErrorZ NodeFeatures_read(struct LDKu8slice ser);
+       export function NodeFeatures_read(ser: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeFeatures_read(encodeArray(ser));
+               return nativeResponseValue;
+       }
+       // struct LDKCResult_ChannelFeaturesDecodeErrorZ ChannelFeatures_read(struct LDKu8slice ser);
+       export function ChannelFeatures_read(ser: Uint8Array): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelFeatures_read(encodeArray(ser));
                return nativeResponseValue;
        }
+       // void RouteHop_free(struct LDKRouteHop this_ptr);
+       export function RouteHop_free(this_ptr: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.RouteHop_free(this_ptr);
+               // debug statements here
+       }
        // struct LDKPublicKey RouteHop_get_pubkey(const struct LDKRouteHop *NONNULL_PTR this_ptr);
        export function RouteHop_get_pubkey(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9328,21 +11322,21 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RouteHop_new(encodeArray(pubkey_arg), node_features_arg, short_channel_id_arg, channel_features_arg, fee_msat_arg, cltv_expiry_delta_arg);
                return nativeResponseValue;
        }
-       // void Route_free(struct LDKRoute this_ptr);
-       export function Route_free(this_ptr: number): void {
+       // struct LDKRouteHop RouteHop_clone(const struct LDKRouteHop *NONNULL_PTR orig);
+       export function RouteHop_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Route_free(this_ptr);
-               // debug statements here
+               const nativeResponseValue = wasm.RouteHop_clone(orig);
+               return nativeResponseValue;
        }
-       // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
-       export function Route_clone(orig: number): number {
+       // void Route_free(struct LDKRoute this_ptr);
+       export function Route_free(this_ptr: number): void {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.Route_clone(orig);
-               return nativeResponseValue;
+               const nativeResponseValue = wasm.Route_free(this_ptr);
+               // debug statements here
        }
        // void Route_set_paths(struct LDKRoute *NONNULL_PTR this_ptr, struct LDKCVec_CVec_RouteHopZZ val);
        export function Route_set_paths(this_ptr: number, val: number[][]): void {
@@ -9360,6 +11354,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.Route_new(paths_arg);
                return nativeResponseValue;
        }
+       // struct LDKRoute Route_clone(const struct LDKRoute *NONNULL_PTR orig);
+       export function Route_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.Route_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z Route_write(const struct LDKRoute *NONNULL_PTR obj);
        export function Route_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9384,14 +11386,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RouteHint_free(this_ptr);
                // debug statements here
        }
-       // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
-       export function RouteHint_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.RouteHint_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKPublicKey RouteHint_get_src_node_id(const struct LDKRouteHint *NONNULL_PTR this_ptr);
        export function RouteHint_get_src_node_id(this_ptr: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9456,36 +11450,20 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RouteHint_set_cltv_expiry_delta(this_ptr, val);
                // debug statements here
        }
-       // uint64_t RouteHint_get_htlc_minimum_msat(const struct LDKRouteHint *NONNULL_PTR this_ptr);
-       export function RouteHint_get_htlc_minimum_msat(this_ptr: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.RouteHint_get_htlc_minimum_msat(this_ptr);
-               return nativeResponseValue;
-       }
-       // void RouteHint_set_htlc_minimum_msat(struct LDKRouteHint *NONNULL_PTR this_ptr, uint64_t val);
-       export function RouteHint_set_htlc_minimum_msat(this_ptr: number, val: number): void {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.RouteHint_set_htlc_minimum_msat(this_ptr, val);
-               // debug statements here
-       }
-       // MUST_USE_RES struct LDKRouteHint RouteHint_new(struct LDKPublicKey src_node_id_arg, uint64_t short_channel_id_arg, struct LDKRoutingFees fees_arg, uint16_t cltv_expiry_delta_arg, uint64_t htlc_minimum_msat_arg);
-       export function RouteHint_new(src_node_id_arg: Uint8Array, short_channel_id_arg: number, fees_arg: number, cltv_expiry_delta_arg: number, htlc_minimum_msat_arg: number): number {
+       // struct LDKRouteHint RouteHint_clone(const struct LDKRouteHint *NONNULL_PTR orig);
+       export function RouteHint_clone(orig: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.RouteHint_new(encodeArray(src_node_id_arg), short_channel_id_arg, fees_arg, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
+               const nativeResponseValue = wasm.RouteHint_clone(orig);
                return nativeResponseValue;
        }
-       // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey target, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
-       export function get_route(our_node_id: Uint8Array, network: number, target: Uint8Array, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
+       // struct LDKCResult_RouteLightningErrorZ get_route(struct LDKPublicKey our_node_id, const struct LDKNetworkGraph *NONNULL_PTR network, struct LDKPublicKey payee, struct LDKCVec_ChannelDetailsZ *first_hops, struct LDKCVec_RouteHintZ last_hops, uint64_t final_value_msat, uint32_t final_cltv, struct LDKLogger logger);
+       export function get_route(our_node_id: Uint8Array, network: number, payee: Uint8Array, first_hops: number[], last_hops: number[], final_value_msat: number, final_cltv: number, logger: number): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
                }
-               const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(target), first_hops, last_hops, final_value_msat, final_cltv, logger);
+               const nativeResponseValue = wasm.get_route(encodeArray(our_node_id), network, encodeArray(payee), first_hops, last_hops, final_value_msat, final_cltv, logger);
                return nativeResponseValue;
        }
        // void NetworkGraph_free(struct LDKNetworkGraph this_ptr);
@@ -9496,6 +11474,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NetworkGraph_free(this_ptr);
                // debug statements here
        }
+       // struct LDKNetworkGraph NetworkGraph_clone(const struct LDKNetworkGraph *NONNULL_PTR orig);
+       export function NetworkGraph_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NetworkGraph_clone(orig);
+               return nativeResponseValue;
+       }
        // void LockedNetworkGraph_free(struct LDKLockedNetworkGraph this_ptr);
        export function LockedNetworkGraph_free(this_ptr: number): void {
                if(!isWasmInitialized) {
@@ -9528,6 +11514,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NetGraphMsgHandler_from_net_graph(chain_access, logger, network_graph);
                return nativeResponseValue;
        }
+       // void NetGraphMsgHandler_add_chain_access(struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg, struct LDKAccess *chain_access);
+       export function NetGraphMsgHandler_add_chain_access(this_arg: number, chain_access: number): void {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NetGraphMsgHandler_add_chain_access(this_arg, chain_access);
+               // debug statements here
+       }
        // MUST_USE_RES struct LDKLockedNetworkGraph NetGraphMsgHandler_read_locked_graph(const struct LDKNetGraphMsgHandler *NONNULL_PTR this_arg);
        export function NetGraphMsgHandler_read_locked_graph(this_arg: number): number {
                if(!isWasmInitialized) {
@@ -9568,14 +11562,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.DirectionalChannelInfo_free(this_ptr);
                // debug statements here
        }
-       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
-       export function DirectionalChannelInfo_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
-               return nativeResponseValue;
-       }
        // uint32_t DirectionalChannelInfo_get_last_update(const struct LDKDirectionalChannelInfo *NONNULL_PTR this_ptr);
        export function DirectionalChannelInfo_get_last_update(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -9672,6 +11658,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.DirectionalChannelInfo_set_last_update_message(this_ptr, val);
                // debug statements here
        }
+       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_clone(const struct LDKDirectionalChannelInfo *NONNULL_PTR orig);
+       export function DirectionalChannelInfo_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.DirectionalChannelInfo_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z DirectionalChannelInfo_write(const struct LDKDirectionalChannelInfo *NONNULL_PTR obj);
        export function DirectionalChannelInfo_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9680,7 +11674,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.DirectionalChannelInfo_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKDirectionalChannelInfo DirectionalChannelInfo_read(struct LDKu8slice ser);
+       // struct LDKCResult_DirectionalChannelInfoDecodeErrorZ DirectionalChannelInfo_read(struct LDKu8slice ser);
        export function DirectionalChannelInfo_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -9792,6 +11786,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelInfo_set_announcement_message(this_ptr, val);
                // debug statements here
        }
+       // struct LDKChannelInfo ChannelInfo_clone(const struct LDKChannelInfo *NONNULL_PTR orig);
+       export function ChannelInfo_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.ChannelInfo_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z ChannelInfo_write(const struct LDKChannelInfo *NONNULL_PTR obj);
        export function ChannelInfo_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -9800,7 +11802,7 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.ChannelInfo_write(obj);
                return decodeArray(nativeResponseValue);
        }
-       // struct LDKChannelInfo ChannelInfo_read(struct LDKu8slice ser);
+       // struct LDKCResult_ChannelInfoDecodeErrorZ ChannelInfo_read(struct LDKu8slice ser);
        export function ChannelInfo_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
                        throw new Error("initializeWasm() must be awaited first!");
@@ -9816,14 +11818,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RoutingFees_free(this_ptr);
                // debug statements here
        }
-       // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
-       export function RoutingFees_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.RoutingFees_clone(orig);
-               return nativeResponseValue;
-       }
        // uint32_t RoutingFees_get_base_msat(const struct LDKRoutingFees *NONNULL_PTR this_ptr);
        export function RoutingFees_get_base_msat(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -9864,6 +11858,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.RoutingFees_new(base_msat_arg, proportional_millionths_arg);
                return nativeResponseValue;
        }
+       // struct LDKRoutingFees RoutingFees_clone(const struct LDKRoutingFees *NONNULL_PTR orig);
+       export function RoutingFees_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.RoutingFees_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCResult_RoutingFeesDecodeErrorZ RoutingFees_read(struct LDKu8slice ser);
        export function RoutingFees_read(ser: Uint8Array): number {
                if(!isWasmInitialized) {
@@ -9888,14 +11890,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeAnnouncementInfo_free(this_ptr);
                // debug statements here
        }
-       // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
-       export function NodeAnnouncementInfo_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
-               return nativeResponseValue;
-       }
        // struct LDKNodeFeatures NodeAnnouncementInfo_get_features(const struct LDKNodeAnnouncementInfo *NONNULL_PTR this_ptr);
        export function NodeAnnouncementInfo_get_features(this_ptr: number): number {
                if(!isWasmInitialized) {
@@ -9992,6 +11986,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeAnnouncementInfo_new(features_arg, last_update_arg, encodeArray(rgb_arg), encodeArray(alias_arg), addresses_arg, announcement_message_arg);
                return nativeResponseValue;
        }
+       // struct LDKNodeAnnouncementInfo NodeAnnouncementInfo_clone(const struct LDKNodeAnnouncementInfo *NONNULL_PTR orig);
+       export function NodeAnnouncementInfo_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeAnnouncementInfo_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z NodeAnnouncementInfo_write(const struct LDKNodeAnnouncementInfo *NONNULL_PTR obj);
        export function NodeAnnouncementInfo_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
@@ -10016,14 +12018,6 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeInfo_free(this_ptr);
                // debug statements here
        }
-       // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
-       export function NodeInfo_clone(orig: number): number {
-               if(!isWasmInitialized) {
-                       throw new Error("initializeWasm() must be awaited first!");
-               }
-               const nativeResponseValue = wasm.NodeInfo_clone(orig);
-               return nativeResponseValue;
-       }
        // void NodeInfo_set_channels(struct LDKNodeInfo *NONNULL_PTR this_ptr, struct LDKCVec_u64Z val);
        export function NodeInfo_set_channels(this_ptr: number, val: number[]): void {
                if(!isWasmInitialized) {
@@ -10072,6 +12066,14 @@ public static native long new_empty_slice_vec();
                const nativeResponseValue = wasm.NodeInfo_new(channels_arg, lowest_inbound_channel_fees_arg, announcement_info_arg);
                return nativeResponseValue;
        }
+       // struct LDKNodeInfo NodeInfo_clone(const struct LDKNodeInfo *NONNULL_PTR orig);
+       export function NodeInfo_clone(orig: number): number {
+               if(!isWasmInitialized) {
+                       throw new Error("initializeWasm() must be awaited first!");
+               }
+               const nativeResponseValue = wasm.NodeInfo_clone(orig);
+               return nativeResponseValue;
+       }
        // struct LDKCVec_u8Z NodeInfo_write(const struct LDKNodeInfo *NONNULL_PTR obj);
        export function NodeInfo_write(obj: number): Uint8Array {
                if(!isWasmInitialized) {
index fed72559cdb2713139fc5d6970df3fa565a3e5b3..057b6a7693eb9d9fe56b8af07b03fe2f759dd57a 100644 (file)
@@ -3,5 +3,6 @@
                 LDKNetwork_Bitcoin,
                                LDKNetwork_Testnet,
                                LDKNetwork_Regtest,
+                               LDKNetwork_Signet,
                                
             }
index 626700976edf4abb9ef3cf328f82a25c159e00f9..58410b8c7385340072c7deed242e742a6843b945 100644 (file)
@@ -7,7 +7,7 @@
                                LDKSecp256k1Error_InvalidSecretKey,
                                LDKSecp256k1Error_InvalidRecoveryId,
                                LDKSecp256k1Error_InvalidTweak,
+                               LDKSecp256k1Error_TweakCheckFailed,
                                LDKSecp256k1Error_NotEnoughMemory,
-                               LDKSecp256k1Error_CallbackPanicked,
                                
             }
index e9719e48e7f96741cc26c17f7265badf62c07185..ba21a7ca7b1beb3acf852db9591f71d00bb86630 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.AcceptChannel_free(this.ptr);
                     }
                 }
-       public AcceptChannel clone() {
-               number ret = bindings.AcceptChannel_clone(this.ptr);
-               const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_temporary_channel_id() {
                Uint8Array ret = bindings.AcceptChannel_get_temporary_channel_id(this.ptr);
                return ret;
@@ -151,15 +144,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.AcceptChannel_set_first_per_commitment_point(this.ptr, val);
        }
 
+       public AcceptChannel clone() {
+               number ret = bindings.AcceptChannel_clone(this.ptr);
+               const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.AcceptChannel_write(this.ptr);
                return ret;
        }
 
-       public static AcceptChannel constructor_read(Uint8Array ser) {
+       public static Result_AcceptChannelDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.AcceptChannel_read(ser);
-               const ret_hu_conv: AcceptChannel = new AcceptChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_AcceptChannelDecodeErrorZ ret_hu_conv = Result_AcceptChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 85625d72b52e0a4d5945b9d3bea5d9fcf91298de..78905ec3afc5b4936acb101d5c914329c01e82cc 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.AnnouncementSignatures_free(this.ptr);
                     }
                 }
-       public AnnouncementSignatures clone() {
-               number ret = bindings.AnnouncementSignatures_clone(this.ptr);
-               const ret_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.AnnouncementSignatures_get_channel_id(this.ptr);
                return ret;
@@ -68,15 +61,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public AnnouncementSignatures clone() {
+               number ret = bindings.AnnouncementSignatures_clone(this.ptr);
+               const ret_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.AnnouncementSignatures_write(this.ptr);
                return ret;
        }
 
-       public static AnnouncementSignatures constructor_read(Uint8Array ser) {
+       public static Result_AnnouncementSignaturesDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.AnnouncementSignatures_read(ser);
-               const ret_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_AnnouncementSignaturesDecodeErrorZ ret_hu_conv = Result_AnnouncementSignaturesDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 56f9977848cfd9374656f6b676dd593d1df2d143..7d2e387c6cf2cb8e85d4c3d29c3024767e5e5ed2 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.BuiltCommitmentTransaction_free(this.ptr);
                     }
                 }
-       public BuiltCommitmentTransaction clone() {
-               number ret = bindings.BuiltCommitmentTransaction_clone(this.ptr);
-               const ret_hu_conv: BuiltCommitmentTransaction = new BuiltCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_transaction() {
                Uint8Array ret = bindings.BuiltCommitmentTransaction_get_transaction(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public BuiltCommitmentTransaction clone() {
+               number ret = bindings.BuiltCommitmentTransaction_clone(this.ptr);
+               const ret_hu_conv: BuiltCommitmentTransaction = new BuiltCommitmentTransaction(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.BuiltCommitmentTransaction_write(this.ptr);
                return ret;
        }
 
-       public static BuiltCommitmentTransaction constructor_read(Uint8Array ser) {
+       public static Result_BuiltCommitmentTransactionDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.BuiltCommitmentTransaction_read(ser);
-               const ret_hu_conv: BuiltCommitmentTransaction = new BuiltCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_BuiltCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_BuiltCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a8312b90c213dab9349da25a2857f5b1cb933c82..5283bdd51fb1d90a8d4231a7e22ba08379d0881a 100644 (file)
@@ -19,7 +19,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                     }
                 }
        public void block_connected(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height) {
-               bindings.ChainMonitor_block_connected(this.ptr, header, (number[])Arrays.stream(txdata).map(arr_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_30.a, arr_conv_30.b)).toArray(), height);
+               bindings.ChainMonitor_block_connected(this.ptr, header, Arrays.stream(txdata).map(txdata_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_30.a, txdata_conv_30.b)).toArray(number[]::new), height);
                /* TODO 2 TwoTuple<Number, Uint8Array>  */;
        }
 
diff --git a/ts/structs/ChainParameters.ts b/ts/structs/ChainParameters.ts
new file mode 100644 (file)
index 0000000..24a2b5f
--- /dev/null
@@ -0,0 +1,55 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class ChainParameters extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.ChainParameters_free(this.ptr);
+                    }
+                }
+       public LDKNetwork get_network() {
+               LDKNetwork ret = bindings.ChainParameters_get_network(this.ptr);
+               return ret;
+       }
+
+       public void set_network(LDKNetwork val) {
+               bindings.ChainParameters_set_network(this.ptr, val);
+       }
+
+       public Uint8Array get_latest_hash() {
+               Uint8Array ret = bindings.ChainParameters_get_latest_hash(this.ptr);
+               return ret;
+       }
+
+       public void set_latest_hash(Uint8Array val) {
+               bindings.ChainParameters_set_latest_hash(this.ptr, val);
+       }
+
+       public number get_latest_height() {
+               number ret = bindings.ChainParameters_get_latest_height(this.ptr);
+               return ret;
+       }
+
+       public void set_latest_height(number val) {
+               bindings.ChainParameters_set_latest_height(this.ptr, val);
+       }
+
+       public static ChainParameters constructor_new(LDKNetwork network_arg, Uint8Array latest_hash_arg, number latest_height_arg) {
+               number ret = bindings.ChainParameters_new(network_arg, latest_hash_arg, latest_height_arg);
+               const ret_hu_conv: ChainParameters = new ChainParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+}
index 0ab592e29cf1be95791d9aa80c59e3f348c32acd..5111590e05a1cc65d3403ba6496ea873aec00b14 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelAnnouncement_free(this.ptr);
                     }
                 }
-       public ChannelAnnouncement clone() {
-               number ret = bindings.ChannelAnnouncement_clone(this.ptr);
-               const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_node_signature_1() {
                Uint8Array ret = bindings.ChannelAnnouncement_get_node_signature_1(this.ptr);
                return ret;
@@ -81,15 +74,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelAnnouncement clone() {
+               number ret = bindings.ChannelAnnouncement_clone(this.ptr);
+               const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelAnnouncement_write(this.ptr);
                return ret;
        }
 
-       public static ChannelAnnouncement constructor_read(Uint8Array ser) {
+       public static Result_ChannelAnnouncementDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelAnnouncement_read(ser);
-               const ret_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelAnnouncementDecodeErrorZ ret_hu_conv = Result_ChannelAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 85d0fa73ceacdf290f3009cb742e7b7e2477b2e7..9bdf48c6b42df8cd7ea18f4d0d1532d5b6c5c6af 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelConfig_free(this.ptr);
                     }
                 }
-       public ChannelConfig clone() {
-               number ret = bindings.ChannelConfig_clone(this.ptr);
-               const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_fee_proportional_millionths() {
                number ret = bindings.ChannelConfig_get_fee_proportional_millionths(this.ptr);
                return ret;
@@ -59,6 +52,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelConfig clone() {
+               number ret = bindings.ChannelConfig_clone(this.ptr);
+               const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelConfig constructor_default() {
                number ret = bindings.ChannelConfig_default();
                const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
@@ -71,10 +71,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static ChannelConfig constructor_read(Uint8Array ser) {
+       public static Result_ChannelConfigDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelConfig_read(ser);
-               const ret_hu_conv: ChannelConfig = new ChannelConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelConfigDecodeErrorZ ret_hu_conv = Result_ChannelConfigDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 5e8c88a20fcfd3e28d452c802a7e40f626d6d734..b7ef907c228ba112e9f4a6d9b4353ce7965cf024 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelDetails_free(this.ptr);
                     }
                 }
-       public ChannelDetails clone() {
-               number ret = bindings.ChannelDetails_clone(this.ptr);
-               const ret_hu_conv: ChannelDetails = new ChannelDetails(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.ChannelDetails_get_channel_id(this.ptr);
                return ret;
@@ -53,14 +46,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_counterparty_features(InitFeatures val) {
                bindings.ChannelDetails_set_counterparty_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public number get_channel_value_satoshis() {
@@ -108,4 +93,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ChannelDetails_set_is_live(this.ptr, val);
        }
 
+       public ChannelDetails clone() {
+               number ret = bindings.ChannelDetails_clone(this.ptr);
+               const ret_hu_conv: ChannelDetails = new ChannelDetails(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index c0be3bbad2c18daa8c3b20a82448ad614d04aab8..1b6dd141a278d76e001a56a62116ba64db01843b 100644 (file)
@@ -18,4 +18,36 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelFeatures_free(this.ptr);
                     }
                 }
+       public ChannelFeatures clone() {
+               number ret = bindings.ChannelFeatures_clone(this.ptr);
+               const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static ChannelFeatures constructor_empty() {
+               number ret = bindings.ChannelFeatures_empty();
+               const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static ChannelFeatures constructor_known() {
+               number ret = bindings.ChannelFeatures_known();
+               const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.ChannelFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_ChannelFeaturesDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.ChannelFeatures_read(ser);
+               Result_ChannelFeaturesDecodeErrorZ ret_hu_conv = Result_ChannelFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index e199a1e30f95f44647ddcd60f1e1911d33919d0b..1db4cd89ff8a59ea8900e43206260a603e865e2c 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelHandshakeConfig_free(this.ptr);
                     }
                 }
-       public ChannelHandshakeConfig clone() {
-               number ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
-               const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_minimum_depth() {
                number ret = bindings.ChannelHandshakeConfig_get_minimum_depth(this.ptr);
                return ret;
@@ -59,6 +52,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelHandshakeConfig clone() {
+               number ret = bindings.ChannelHandshakeConfig_clone(this.ptr);
+               const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelHandshakeConfig constructor_default() {
                number ret = bindings.ChannelHandshakeConfig_default();
                const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
index f0c549ba18375e19f1ed8f9680a47ef6737554a4..3dfab3912f94deae28a611ab18ccd8b6fba559e4 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelHandshakeLimits_free(this.ptr);
                     }
                 }
-       public ChannelHandshakeLimits clone() {
-               number ret = bindings.ChannelHandshakeLimits_clone(this.ptr);
-               const ret_hu_conv: ChannelHandshakeLimits = new ChannelHandshakeLimits(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_min_funding_satoshis() {
                number ret = bindings.ChannelHandshakeLimits_get_min_funding_satoshis(this.ptr);
                return ret;
@@ -122,6 +115,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelHandshakeLimits clone() {
+               number ret = bindings.ChannelHandshakeLimits_clone(this.ptr);
+               const ret_hu_conv: ChannelHandshakeLimits = new ChannelHandshakeLimits(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static ChannelHandshakeLimits constructor_default() {
                number ret = bindings.ChannelHandshakeLimits_default();
                const ret_hu_conv: ChannelHandshakeLimits = new ChannelHandshakeLimits(null, ret);
index b99fd456af0890c858f1bafd247cd8a476d95d17..ea7a292f8cacf9cabb302524ee2571cb7ff1ab46 100644 (file)
@@ -28,14 +28,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_features(ChannelFeatures val) {
                bindings.ChannelInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public Uint8Array get_node_one() {
@@ -92,15 +84,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                this.ptrs_to.add(val);
        }
 
+       public ChannelInfo clone() {
+               number ret = bindings.ChannelInfo_clone(this.ptr);
+               const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelInfo_write(this.ptr);
                return ret;
        }
 
-       public static ChannelInfo constructor_read(Uint8Array ser) {
+       public static Result_ChannelInfoDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelInfo_read(ser);
-               const ret_hu_conv: ChannelInfo = new ChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelInfoDecodeErrorZ ret_hu_conv = Result_ChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
diff --git a/ts/structs/ChannelKeys.ts b/ts/structs/ChannelKeys.ts
deleted file mode 100644 (file)
index 61daa25..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-
-            
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-
-
-            export class ChannelKeys extends CommonBase {
-
-                bindings_instance?: bindings.LDKChannelKeys;
-
-                constructor(ptr?: number, arg?: bindings.LDKChannelKeys, pubkeys?: ChannelPublicKeys) {
-                    if (Number.isFinite(ptr)) {
-                                       super(ptr);
-                                       this.bindings_instance = null;
-                                   } else {
-                                       // TODO: private constructor instantiation
-                                       super(bindings.LDKChannelKeys_new(arg, pubkeys == null ? 0 : pubkeys.ptr & ~1));
-                                       this.ptrs_to.push(arg);
-                                       this.ptrs_to.add(pubkeys);
-
-                                   }
-                }
-
-                protected finalize() {
-                    if (this.ptr != 0) {
-                        bindings.ChannelKeys_free(this.ptr);
-                    }
-                    super.finalize();
-                }
-
-                static new_impl(arg: ChannelKeysInterface, pubkeys: ChannelPublicKeys): ChannelKeys {
-                    const impl_holder: LDKChannelKeysHolder = new LDKChannelKeysHolder();
-                    let structImplementation = <bindings.LDKChannelKeys>{
-                        // todo: in-line interface filling
-                        get_per_commitment_point (idx: number): Uint8Array {
-                                                       Uint8Array ret = arg.get_per_commitment_point(idx);
-                               return ret;
-                                               },
-
-                                               release_commitment_secret (idx: number): Uint8Array {
-                                                       Uint8Array ret = arg.release_commitment_secret(idx);
-                               return ret;
-                                               },
-
-                                               key_derivation_params (): number {
-                                                       TwoTuple<Number, Number> ret = arg.key_derivation_params();
-                               result: number = bindings.C2Tuple_u64u64Z_new(ret.a, ret.b);
-                               return result;
-                                               },
-
-                                               sign_counterparty_commitment (commitment_tx: number): number {
-                                                       const commitment_tx_hu_conv: CommitmentTransaction = new CommitmentTransaction(null, commitment_tx);
-                                                       Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = arg.sign_counterparty_commitment(commitment_tx_hu_conv);
-                               result: number = ret != null ? ret.ptr : 0;
-                               return result;
-                                               },
-
-                                               sign_holder_commitment_and_htlcs (commitment_tx: number): number {
-                                                       const commitment_tx_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, commitment_tx);
-                                                       Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = arg.sign_holder_commitment_and_htlcs(commitment_tx_hu_conv);
-                               result: number = ret != null ? ret.ptr : 0;
-                               return result;
-                                               },
-
-                                               sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
-                                                       const htlc_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, htlc);
-                                                       Result_SignatureNoneZ ret = arg.sign_justice_transaction(justice_tx, input, amount, per_commitment_key, htlc_hu_conv);
-                               result: number = ret != null ? ret.ptr : 0;
-                               return result;
-                                               },
-
-                                               sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
-                                                       const htlc_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, htlc);
-                                                       Result_SignatureNoneZ ret = arg.sign_counterparty_htlc_transaction(htlc_tx, input, amount, per_commitment_point, htlc_hu_conv);
-                               result: number = ret != null ? ret.ptr : 0;
-                               return result;
-                                               },
-
-                                               sign_closing_transaction (closing_tx: Uint8Array): number {
-                                                       Result_SignatureNoneZ ret = arg.sign_closing_transaction(closing_tx);
-                               result: number = ret != null ? ret.ptr : 0;
-                               return result;
-                                               },
-
-                                               sign_channel_announcement (msg: number): number {
-                                                       const msg_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, msg);
-                                                       Result_SignatureNoneZ ret = arg.sign_channel_announcement(msg_hu_conv);
-                               result: number = ret != null ? ret.ptr : 0;
-                               return result;
-                                               },
-
-                                               ready_channel (channel_parameters: number): void {
-                                                       const channel_parameters_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, channel_parameters);
-                                                       arg.ready_channel(channel_parameters_hu_conv);
-                                               },
-
-                                               write (): Uint8Array {
-                                                       Uint8Array ret = arg.write();
-                               return ret;
-                                               },
-
-                                               
-                    };
-                    impl_holder.held = new ChannelKeys (null, structImplementation, pubkeys);
-                }
-            }
-
-            export interface ChannelKeysInterface {
-                get_per_commitment_point(idx: number): Uint8Array;
-                               release_commitment_secret(idx: number): Uint8Array;
-                               key_derivation_params(): TwoTuple<Number, Number>;
-                               sign_counterparty_commitment(commitment_tx: CommitmentTransaction): Result_C2Tuple_SignatureCVec_SignatureZZNoneZ;
-                               sign_holder_commitment_and_htlcs(commitment_tx: HolderCommitmentTransaction): Result_C2Tuple_SignatureCVec_SignatureZZNoneZ;
-                               sign_justice_transaction(justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: HTLCOutputInCommitment): Result_SignatureNoneZ;
-                               sign_counterparty_htlc_transaction(htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: HTLCOutputInCommitment): Result_SignatureNoneZ;
-                               sign_closing_transaction(closing_tx: Uint8Array): Result_SignatureNoneZ;
-                               sign_channel_announcement(msg: UnsignedChannelAnnouncement): Result_SignatureNoneZ;
-                               ready_channel(channel_parameters: ChannelTransactionParameters): void;
-                               write(): Uint8Array;
-                               
-            }
-
-            class LDKChannelKeysHolder {
-                held: ChannelKeys;
-            }
-       public Uint8Array get_per_commitment_point(number idx) {
-               Uint8Array ret = bindings.ChannelKeys_get_per_commitment_point(this.ptr, idx);
-               return ret;
-       }
-
-       public Uint8Array release_commitment_secret(number idx) {
-               Uint8Array ret = bindings.ChannelKeys_release_commitment_secret(this.ptr, idx);
-               return ret;
-       }
-
-       public TwoTuple<Number, Number> key_derivation_params() {
-               number ret = bindings.ChannelKeys_key_derivation_params(this.ptr);
-               number ret_a = bindings.LDKC2Tuple_u64u64Z_get_a(ret);
-               number ret_b = bindings.LDKC2Tuple_u64u64Z_get_b(ret);
-               TwoTuple<Number, Number> ret_conv = new TwoTuple<Number, Number>(ret_a, ret_b, () -> {
-                       bindings.C2Tuple_u64u64Z_free(ret);
-               });
-               return ret_conv;
-       }
-
-       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment(CommitmentTransaction commitment_tx) {
-               number ret = bindings.ChannelKeys_sign_counterparty_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr & ~1);
-               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(commitment_tx);
-               return ret_hu_conv;
-       }
-
-       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs(HolderCommitmentTransaction commitment_tx) {
-               number ret = bindings.ChannelKeys_sign_holder_commitment_and_htlcs(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr & ~1);
-               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(commitment_tx);
-               return ret_hu_conv;
-       }
-
-       public Result_SignatureNoneZ sign_justice_transaction(Uint8Array justice_tx, number input, number amount, Uint8Array per_commitment_key, HTLCOutputInCommitment htlc) {
-               number ret = bindings.ChannelKeys_sign_justice_transaction(this.ptr, justice_tx, input, amount, per_commitment_key, htlc == null ? 0 : htlc.ptr & ~1);
-               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(htlc);
-               return ret_hu_conv;
-       }
-
-       public Result_SignatureNoneZ sign_counterparty_htlc_transaction(Uint8Array htlc_tx, number input, number amount, Uint8Array per_commitment_point, HTLCOutputInCommitment htlc) {
-               number ret = bindings.ChannelKeys_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, per_commitment_point, htlc == null ? 0 : htlc.ptr & ~1);
-               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(htlc);
-               return ret_hu_conv;
-       }
-
-       public Result_SignatureNoneZ sign_closing_transaction(Uint8Array closing_tx) {
-               number ret = bindings.ChannelKeys_sign_closing_transaction(this.ptr, closing_tx);
-               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
-       public Result_SignatureNoneZ sign_channel_announcement(UnsignedChannelAnnouncement msg) {
-               number ret = bindings.ChannelKeys_sign_channel_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1);
-               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
-               this.ptrs_to.add(msg);
-               return ret_hu_conv;
-       }
-
-       public void ready_channel(ChannelTransactionParameters channel_parameters) {
-               bindings.ChannelKeys_ready_channel(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr & ~1);
-               this.ptrs_to.add(channel_parameters);
-       }
-
-       public Uint8Array write() {
-               Uint8Array ret = bindings.ChannelKeys_write(this.ptr);
-               return ret;
-       }
-
-       public ChannelPublicKeys get_pubkeys() {
-               number ret = bindings.ChannelKeys_get_pubkeys(this.ptr);
-               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public ChannelKeys clone() {
-               number ret = bindings.ChannelKeys_clone(this.ptr);
-               ChannelKeys ret_hu_conv = new ChannelKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-}
index 27570f00cb3b08e657ceacfe97ddd04b8528346d..72337ed604cdd530e377c95eee8f5d3b675b19ff 100644 (file)
@@ -18,8 +18,8 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelManager_free(this.ptr);
                     }
                 }
-       public static ChannelManager constructor_new(LDKNetwork network, FeeEstimator fee_est, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, KeysInterface keys_manager, UserConfig config, number current_blockchain_height) {
-               number ret = bindings.ChannelManager_new(network, fee_est == null ? 0 : fee_est.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, keys_manager == null ? 0 : keys_manager.ptr, config == null ? 0 : config.ptr & ~1, current_blockchain_height);
+       public static ChannelManager constructor_new(FeeEstimator fee_est, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, KeysInterface keys_manager, UserConfig config, LDKNetwork params_network_arg, Uint8Array params_latest_hash_arg, number params_latest_height_arg) {
+               number ret = bindings.ChannelManager_new(fee_est == null ? 0 : fee_est.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, keys_manager == null ? 0 : keys_manager.ptr, config == null ? 0 : config.ptr & ~1, bindings.ChainParameters_new(params_network_arg, params_latest_hash_arg, params_latest_height_arg));
                const ret_hu_conv: ChannelManager = new ChannelManager(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(fee_est);
@@ -40,26 +40,26 @@ import * as bindings from '../bindings' // TODO: figure out location
 
        public ChannelDetails[] list_channels() {
                number[] ret = bindings.ChannelManager_list_channels(this.ptr);
-               ChannelDetails[] arr_conv_16_arr = new ChannelDetails[ret.length];
+               ChannelDetails[] ret_conv_16_arr = new ChannelDetails[ret.length];
                for (int q = 0; q < ret.length; q++) {
-                       number arr_conv_16 = ret[q];
-                       const arr_conv_16_hu_conv: ChannelDetails = new ChannelDetails(null, arr_conv_16);
-                       arr_conv_16_hu_conv.ptrs_to.add(this);
-                       arr_conv_16_arr[q] = arr_conv_16_hu_conv;
+                       number ret_conv_16 = ret[q];
+                       const ret_conv_16_hu_conv: ChannelDetails = new ChannelDetails(null, ret_conv_16);
+                       ret_conv_16_hu_conv.ptrs_to.add(this);
+                       ret_conv_16_arr[q] = ret_conv_16_hu_conv;
                }
-               return arr_conv_16_arr;
+               return ret_conv_16_arr;
        }
 
        public ChannelDetails[] list_usable_channels() {
                number[] ret = bindings.ChannelManager_list_usable_channels(this.ptr);
-               ChannelDetails[] arr_conv_16_arr = new ChannelDetails[ret.length];
+               ChannelDetails[] ret_conv_16_arr = new ChannelDetails[ret.length];
                for (int q = 0; q < ret.length; q++) {
-                       number arr_conv_16 = ret[q];
-                       const arr_conv_16_hu_conv: ChannelDetails = new ChannelDetails(null, arr_conv_16);
-                       arr_conv_16_hu_conv.ptrs_to.add(this);
-                       arr_conv_16_arr[q] = arr_conv_16_hu_conv;
+                       number ret_conv_16 = ret[q];
+                       const ret_conv_16_hu_conv: ChannelDetails = new ChannelDetails(null, ret_conv_16);
+                       ret_conv_16_hu_conv.ptrs_to.add(this);
+                       ret_conv_16_arr[q] = ret_conv_16_hu_conv;
                }
-               return arr_conv_16_arr;
+               return ret_conv_16_arr;
        }
 
        public Result_NoneAPIErrorZ close_channel(Uint8Array channel_id) {
@@ -91,7 +91,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void broadcast_node_announcement(Uint8Array rgb, Uint8Array alias, NetAddress[] addresses) {
-               bindings.ChannelManager_broadcast_node_announcement(this.ptr, rgb, alias, (number[])Arrays.stream(addresses).map(arr_conv_12 -> arr_conv_12.ptr).toArray());
+               bindings.ChannelManager_broadcast_node_announcement(this.ptr, rgb, alias, Arrays.stream(addresses).map(addresses_conv_12 -> addresses_conv_12.ptr).toArray(number[]::new));
                /* TODO 2 NetAddress  */;
        }
 
@@ -137,8 +137,15 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public Listen as_Listen() {
+               number ret = bindings.ChannelManager_as_Listen(this.ptr);
+               Listen ret_hu_conv = new Listen(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public void block_connected(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height) {
-               bindings.ChannelManager_block_connected(this.ptr, header, (number[])Arrays.stream(txdata).map(arr_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_30.a, arr_conv_30.b)).toArray(), height);
+               bindings.ChannelManager_block_connected(this.ptr, header, Arrays.stream(txdata).map(txdata_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_30.a, txdata_conv_30.b)).toArray(number[]::new), height);
                /* TODO 2 TwoTuple<Number, Uint8Array>  */;
        }
 
@@ -146,6 +153,10 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ChannelManager_block_disconnected(this.ptr, header);
        }
 
+       public void await_persistable_update() {
+               bindings.ChannelManager_await_persistable_update(this.ptr);
+       }
+
        public ChannelMessageHandler as_ChannelMessageHandler() {
                number ret = bindings.ChannelManager_as_ChannelMessageHandler(this.ptr);
                ChannelMessageHandler ret_hu_conv = new ChannelMessageHandler(null, ret);
index ff9865e9bba1fa2745518c235ab89778351c481b..596df3a8117b6987e2f389b1c4afdfd0a987afd8 100644 (file)
@@ -91,7 +91,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public static ChannelManagerReadArgs constructor_new(KeysInterface keys_manager, FeeEstimator fee_estimator, Watch chain_monitor, BroadcasterInterface tx_broadcaster, Logger logger, UserConfig default_config, ChannelMonitor[] channel_monitors) {
-               number ret = bindings.ChannelManagerReadArgs_new(keys_manager == null ? 0 : keys_manager.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, default_config == null ? 0 : default_config.ptr & ~1, (number[])Arrays.stream(channel_monitors).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray());
+               number ret = bindings.ChannelManagerReadArgs_new(keys_manager == null ? 0 : keys_manager.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, chain_monitor == null ? 0 : chain_monitor.ptr, tx_broadcaster == null ? 0 : tx_broadcaster.ptr, logger == null ? 0 : logger.ptr, default_config == null ? 0 : default_config.ptr & ~1, Arrays.stream(channel_monitors).map(channel_monitors_conv_16 -> channel_monitors_conv_16 == null ? 0 : channel_monitors_conv_16.ptr & ~1).toArray(number[]::new));
                const ret_hu_conv: ChannelManagerReadArgs = new ChannelManagerReadArgs(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(keys_manager);
index aff48916deda48b9c2066749c8e5c582d5f1e814..a9ffbd7cf4557a3ab16860465fe60ce8492065b2 100644 (file)
@@ -62,9 +62,10 @@ import * as bindings from '../bindings' // TODO: figure out location
                                                        arg.handle_funding_locked(their_node_id, msg_hu_conv);
                                                },
 
-                                               handle_shutdown (their_node_id: Uint8Array, msg: number): void {
+                                               handle_shutdown (their_node_id: Uint8Array, their_features: number, msg: number): void {
+                                                       const their_features_hu_conv: InitFeatures = new InitFeatures(null, their_features);
                                                        const msg_hu_conv: Shutdown = new Shutdown(null, msg);
-                                                       arg.handle_shutdown(their_node_id, msg_hu_conv);
+                                                       arg.handle_shutdown(their_node_id, their_features_hu_conv, msg_hu_conv);
                                                },
 
                                                handle_closing_signed (their_node_id: Uint8Array, msg: number): void {
@@ -143,7 +144,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                                handle_funding_created(their_node_id: Uint8Array, msg: FundingCreated): void;
                                handle_funding_signed(their_node_id: Uint8Array, msg: FundingSigned): void;
                                handle_funding_locked(their_node_id: Uint8Array, msg: FundingLocked): void;
-                               handle_shutdown(their_node_id: Uint8Array, msg: Shutdown): void;
+                               handle_shutdown(their_node_id: Uint8Array, their_features: InitFeatures, msg: Shutdown): void;
                                handle_closing_signed(their_node_id: Uint8Array, msg: ClosingSigned): void;
                                handle_update_add_htlc(their_node_id: Uint8Array, msg: UpdateAddHTLC): void;
                                handle_update_fulfill_htlc(their_node_id: Uint8Array, msg: UpdateFulfillHTLC): void;
@@ -166,28 +167,12 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void handle_open_channel(Uint8Array their_node_id, InitFeatures their_features, OpenChannel msg) {
                bindings.ChannelMessageHandler_handle_open_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(their_features);
-               // 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, their_features is reset to null and is now a dummy object.
-               their_features.ptr = 0;
                this.ptrs_to.add(msg);
        }
 
        public void handle_accept_channel(Uint8Array their_node_id, InitFeatures their_features, AcceptChannel msg) {
                bindings.ChannelMessageHandler_handle_accept_channel(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
                this.ptrs_to.add(their_features);
-               // 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, their_features is reset to null and is now a dummy object.
-               their_features.ptr = 0;
                this.ptrs_to.add(msg);
        }
 
@@ -206,8 +191,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                this.ptrs_to.add(msg);
        }
 
-       public void handle_shutdown(Uint8Array their_node_id, Shutdown msg) {
-               bindings.ChannelMessageHandler_handle_shutdown(this.ptr, their_node_id, msg == null ? 0 : msg.ptr & ~1);
+       public void handle_shutdown(Uint8Array their_node_id, InitFeatures their_features, Shutdown msg) {
+               bindings.ChannelMessageHandler_handle_shutdown(this.ptr, their_node_id, their_features == null ? 0 : their_features.ptr & ~1, msg == null ? 0 : msg.ptr & ~1);
+               this.ptrs_to.add(their_features);
                this.ptrs_to.add(msg);
        }
 
index ff746a206aa4d6710141f5d54ecf94f242e4c55e..a2f5913795d4596a1dd5fde138ce8631b922a384 100644 (file)
@@ -60,26 +60,26 @@ import * as bindings from '../bindings' // TODO: figure out location
 
        public MonitorEvent[] get_and_clear_pending_monitor_events() {
                number[] ret = bindings.ChannelMonitor_get_and_clear_pending_monitor_events(this.ptr);
-               MonitorEvent[] arr_conv_14_arr = new MonitorEvent[ret.length];
+               MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret.length];
                for (int o = 0; o < ret.length; o++) {
-                       number arr_conv_14 = ret[o];
-                       const arr_conv_14_hu_conv: MonitorEvent = new MonitorEvent(null, arr_conv_14);
-                       arr_conv_14_hu_conv.ptrs_to.add(this);
-                       arr_conv_14_arr[o] = arr_conv_14_hu_conv;
+                       number ret_conv_14 = ret[o];
+                       MonitorEvent ret_conv_14_hu_conv = MonitorEvent.constr_from_ptr(ret_conv_14);
+                       ret_conv_14_hu_conv.ptrs_to.add(this);
+                       ret_conv_14_arr[o] = ret_conv_14_hu_conv;
                }
-               return arr_conv_14_arr;
+               return ret_conv_14_arr;
        }
 
        public Event[] get_and_clear_pending_events() {
                number[] ret = bindings.ChannelMonitor_get_and_clear_pending_events(this.ptr);
-               Event[] arr_conv_7_arr = new Event[ret.length];
+               Event[] ret_conv_7_arr = new Event[ret.length];
                for (int h = 0; h < ret.length; h++) {
-                       number arr_conv_7 = ret[h];
-                       Event arr_conv_7_hu_conv = Event.constr_from_ptr(arr_conv_7);
-                       arr_conv_7_hu_conv.ptrs_to.add(this);
-                       arr_conv_7_arr[h] = arr_conv_7_hu_conv;
+                       number ret_conv_7 = ret[h];
+                       Event ret_conv_7_hu_conv = Event.constr_from_ptr(ret_conv_7);
+                       ret_conv_7_hu_conv.ptrs_to.add(this);
+                       ret_conv_7_arr[h] = ret_conv_7_hu_conv;
                }
-               return arr_conv_7_arr;
+               return ret_conv_7_arr;
        }
 
        public Uint8Array[] get_latest_holder_commitment_txn(Logger logger) {
@@ -89,33 +89,33 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] block_connected(Uint8Array header, TwoTuple<Number, Uint8Array>[] txdata, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
-               number[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, (number[])Arrays.stream(txdata).map(arr_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(arr_conv_30.a, arr_conv_30.b)).toArray(), height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
-               TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] arr_conv_49_arr = new TwoTuple[ret.length];
+               number[] ret = bindings.ChannelMonitor_block_connected(this.ptr, header, Arrays.stream(txdata).map(txdata_conv_30 -> bindings.C2Tuple_usizeTransactionZ_new(txdata_conv_30.a, txdata_conv_30.b)).toArray(number[]::new), height, broadcaster == null ? 0 : broadcaster.ptr, fee_estimator == null ? 0 : fee_estimator.ptr, logger == null ? 0 : logger.ptr);
+               TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>[] ret_conv_49_arr = new TwoTuple[ret.length];
                for (int x = 0; x < ret.length; x++) {
-                       number arr_conv_49 = ret[x];
-                       Uint8Array arr_conv_49_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(arr_conv_49);
-                       number[] arr_conv_49_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(arr_conv_49);
-                       TwoTuple<Number, TxOut>[] arr_conv_25_arr = new TwoTuple[arr_conv_49_b.length];
-                       for (int z = 0; z < arr_conv_49_b.length; z++) {
-                               number arr_conv_25 = arr_conv_49_b[z];
-                               number arr_conv_25_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(arr_conv_25);
-                               number arr_conv_25_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(arr_conv_25));
-                               TxOut arr_conv_25_b_conv = new TxOut(null, arr_conv_25_b);;
-                               TwoTuple<Number, TxOut> arr_conv_25_conv = new TwoTuple<Number, TxOut>(arr_conv_25_a, arr_conv_25_b_conv, () -> {
-                                       bindings.C2Tuple_u32TxOutZ_free(arr_conv_25);
+                       number ret_conv_49 = ret[x];
+                       Uint8Array ret_conv_49_a = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_a(ret_conv_49);
+                       number[] ret_conv_49_b = bindings.LDKC2Tuple_TxidCVec_C2Tuple_u32TxOutZZZ_get_b(ret_conv_49);
+                       TwoTuple<Number, TxOut>[] ret_conv_49_b_conv_25_arr = new TwoTuple[ret_conv_49_b.length];
+                       for (int z = 0; z < ret_conv_49_b.length; z++) {
+                               number ret_conv_49_b_conv_25 = ret_conv_49_b[z];
+                               number ret_conv_49_b_conv_25_a = bindings.LDKC2Tuple_u32TxOutZ_get_a(ret_conv_49_b_conv_25);
+                               number ret_conv_49_b_conv_25_b = bindings.TxOut_clone(bindings.LDKC2Tuple_u32TxOutZ_get_b(ret_conv_49_b_conv_25));
+                               TxOut ret_conv_49_b_conv_25_b_conv = new TxOut(null, ret_conv_49_b_conv_25_b);;
+                               TwoTuple<Number, TxOut> ret_conv_49_b_conv_25_conv = new TwoTuple<Number, TxOut>(ret_conv_49_b_conv_25_a, ret_conv_49_b_conv_25_b_conv, () -> {
+                                       bindings.C2Tuple_u32TxOutZ_free(ret_conv_49_b_conv_25);
                                });
-                               arr_conv_25_b_conv.ptrs_to.add(arr_conv_25_conv);
-                               arr_conv_25_arr[z] = arr_conv_25_conv;
+                               ret_conv_49_b_conv_25_b_conv.ptrs_to.add(ret_conv_49_b_conv_25_conv);
+                               ret_conv_49_b_conv_25_arr[z] = ret_conv_49_b_conv_25_conv;
                        };
-                       TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]> arr_conv_49_conv = new TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>(arr_conv_49_a, arr_conv_25_arr);
+                       TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]> ret_conv_49_conv = new TwoTuple<Uint8Array, TwoTuple<Number, TxOut>[]>(ret_conv_49_a, ret_conv_49_b_conv_25_arr);
                        // Warning: We may not free the C tuple object!
-                       arr_conv_49_arr[x] = arr_conv_49_conv;
+                       ret_conv_49_arr[x] = ret_conv_49_conv;
                }
                /* TODO 2 TwoTuple<Number, Uint8Array>  */;
                this.ptrs_to.add(broadcaster);
                this.ptrs_to.add(fee_estimator);
                this.ptrs_to.add(logger);
-               return arr_conv_49_arr;
+               return ret_conv_49_arr;
        }
 
        public void block_disconnected(Uint8Array header, number height, BroadcasterInterface broadcaster, FeeEstimator fee_estimator, Logger logger) {
index 3217804ef0ae7b04ea8bb4e02aab064edf124a95..80e11cd18b1aaddac9b3b8a6d8455e905b565bdd 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelMonitorUpdate_free(this.ptr);
                     }
                 }
-       public ChannelMonitorUpdate clone() {
-               number ret = bindings.ChannelMonitorUpdate_clone(this.ptr);
-               const ret_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_update_id() {
                number ret = bindings.ChannelMonitorUpdate_get_update_id(this.ptr);
                return ret;
@@ -34,6 +27,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ChannelMonitorUpdate_set_update_id(this.ptr, val);
        }
 
+       public ChannelMonitorUpdate clone() {
+               number ret = bindings.ChannelMonitorUpdate_clone(this.ptr);
+               const ret_hu_conv: ChannelMonitorUpdate = new ChannelMonitorUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelMonitorUpdate_write(this.ptr);
                return ret;
index 572c44caa70bfe825f887eed164d038fd252783b..758d809bf41da02d13ab8d3e9171d20d4af481da 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelPublicKeys_free(this.ptr);
                     }
                 }
-       public ChannelPublicKeys clone() {
-               number ret = bindings.ChannelPublicKeys_clone(this.ptr);
-               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_funding_pubkey() {
                Uint8Array ret = bindings.ChannelPublicKeys_get_funding_pubkey(this.ptr);
                return ret;
@@ -77,15 +70,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelPublicKeys clone() {
+               number ret = bindings.ChannelPublicKeys_clone(this.ptr);
+               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelPublicKeys_write(this.ptr);
                return ret;
        }
 
-       public static ChannelPublicKeys constructor_read(Uint8Array ser) {
+       public static Result_ChannelPublicKeysDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelPublicKeys_read(ser);
-               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelPublicKeysDecodeErrorZ ret_hu_conv = Result_ChannelPublicKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 9dfd0976da6af50161282452c6eb44b873e37c60..0be4b49dc82ccda0e51e6ed8860bf735258f7128 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelReestablish_free(this.ptr);
                     }
                 }
-       public ChannelReestablish clone() {
-               number ret = bindings.ChannelReestablish_clone(this.ptr);
-               const ret_hu_conv: ChannelReestablish = new ChannelReestablish(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.ChannelReestablish_get_channel_id(this.ptr);
                return ret;
@@ -52,6 +45,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ChannelReestablish_set_next_remote_commitment_number(this.ptr, val);
        }
 
+       public ChannelReestablish clone() {
+               number ret = bindings.ChannelReestablish_clone(this.ptr);
+               const ret_hu_conv: ChannelReestablish = new ChannelReestablish(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelReestablish_write(this.ptr);
                return ret;
index 3a9d901671094b34bd2aba6154c1ae0baf56d6d9..1877ccee35f4f87c164155f1141ac5a0d227a7ad 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelTransactionParameters_free(this.ptr);
                     }
                 }
-       public ChannelTransactionParameters clone() {
-               number ret = bindings.ChannelTransactionParameters_clone(this.ptr);
-               const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelPublicKeys get_holder_pubkeys() {
                number ret = bindings.ChannelTransactionParameters_get_holder_pubkeys(this.ptr);
                const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
@@ -89,6 +82,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelTransactionParameters clone() {
+               number ret = bindings.ChannelTransactionParameters_clone(this.ptr);
+               const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public boolean is_populated() {
                boolean ret = bindings.ChannelTransactionParameters_is_populated(this.ptr);
                return ret;
@@ -113,10 +113,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static ChannelTransactionParameters constructor_read(Uint8Array ser) {
+       public static Result_ChannelTransactionParametersDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelTransactionParameters_read(ser);
-               const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_ChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 524e9a54caf166981771b46f9071ff4cc5d2ef55..61c2af4eb5f55718f99037bba7a198e460dcfded 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ChannelUpdate_free(this.ptr);
                     }
                 }
-       public ChannelUpdate clone() {
-               number ret = bindings.ChannelUpdate_clone(this.ptr);
-               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_signature() {
                Uint8Array ret = bindings.ChannelUpdate_get_signature(this.ptr);
                return ret;
@@ -54,15 +47,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ChannelUpdate clone() {
+               number ret = bindings.ChannelUpdate_clone(this.ptr);
+               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ChannelUpdate_write(this.ptr);
                return ret;
        }
 
-       public static ChannelUpdate constructor_read(Uint8Array ser) {
+       public static Result_ChannelUpdateDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ChannelUpdate_read(ser);
-               const ret_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ChannelUpdateDecodeErrorZ ret_hu_conv = Result_ChannelUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index cd6eb15b0123fb12eb85d80e51a0ecba873a1a20..5056beda5b43841fc2d1ed7ef36e0c17a4b99faf 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ClosingSigned_free(this.ptr);
                     }
                 }
-       public ClosingSigned clone() {
-               number ret = bindings.ClosingSigned_clone(this.ptr);
-               const ret_hu_conv: ClosingSigned = new ClosingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.ClosingSigned_get_channel_id(this.ptr);
                return ret;
@@ -59,15 +52,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ClosingSigned clone() {
+               number ret = bindings.ClosingSigned_clone(this.ptr);
+               const ret_hu_conv: ClosingSigned = new ClosingSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ClosingSigned_write(this.ptr);
                return ret;
        }
 
-       public static ClosingSigned constructor_read(Uint8Array ser) {
+       public static Result_ClosingSignedDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ClosingSigned_read(ser);
-               const ret_hu_conv: ClosingSigned = new ClosingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ClosingSignedDecodeErrorZ ret_hu_conv = Result_ClosingSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 58089b3baf3cd9d5c1b7c36e1b1354b3c7a0a171..0c99e819c20c70da84243ca6d84f0be36375a83a 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.CommitmentSigned_free(this.ptr);
                     }
                 }
-       public CommitmentSigned clone() {
-               number ret = bindings.CommitmentSigned_clone(this.ptr);
-               const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.CommitmentSigned_get_channel_id(this.ptr);
                return ret;
@@ -54,15 +47,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public CommitmentSigned clone() {
+               number ret = bindings.CommitmentSigned_clone(this.ptr);
+               const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.CommitmentSigned_write(this.ptr);
                return ret;
        }
 
-       public static CommitmentSigned constructor_read(Uint8Array ser) {
+       public static Result_CommitmentSignedDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.CommitmentSigned_read(ser);
-               const ret_hu_conv: CommitmentSigned = new CommitmentSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CommitmentSignedDecodeErrorZ ret_hu_conv = Result_CommitmentSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 4d13ed9a8f18d56cf6eaf63e26209c351cb8d72f..97c85a9f858d269c18042b7b32dece1e321ae344 100644 (file)
@@ -30,10 +30,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static CommitmentTransaction constructor_read(Uint8Array ser) {
+       public static Result_CommitmentTransactionDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.CommitmentTransaction_read(ser);
-               const ret_hu_conv: CommitmentTransaction = new CommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CommitmentTransactionDecodeErrorZ ret_hu_conv = Result_CommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 3564c6991a4a57d9a242869fc852c2c082a0542d..39aed69e9e74069695fada2e7a50d06241c33ef5 100644 (file)
@@ -18,30 +18,23 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.CommitmentUpdate_free(this.ptr);
                     }
                 }
-       public CommitmentUpdate clone() {
-               number ret = bindings.CommitmentUpdate_clone(this.ptr);
-               const ret_hu_conv: CommitmentUpdate = new CommitmentUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_update_add_htlcs(UpdateAddHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, (number[])Arrays.stream(val).map(arr_conv_15 -> arr_conv_15 == null ? 0 : arr_conv_15.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_add_htlcs(this.ptr, Arrays.stream(val).map(val_conv_15 -> val_conv_15 == null ? 0 : val_conv_15.ptr & ~1).toArray(number[]::new));
                /* TODO 2 UpdateAddHTLC  */;
        }
 
        public void set_update_fulfill_htlcs(UpdateFulfillHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, (number[])Arrays.stream(val).map(arr_conv_19 -> arr_conv_19 == null ? 0 : arr_conv_19.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_fulfill_htlcs(this.ptr, Arrays.stream(val).map(val_conv_19 -> val_conv_19 == null ? 0 : val_conv_19.ptr & ~1).toArray(number[]::new));
                /* TODO 2 UpdateFulfillHTLC  */;
        }
 
        public void set_update_fail_htlcs(UpdateFailHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, (number[])Arrays.stream(val).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_fail_htlcs(this.ptr, Arrays.stream(val).map(val_conv_16 -> val_conv_16 == null ? 0 : val_conv_16.ptr & ~1).toArray(number[]::new));
                /* TODO 2 UpdateFailHTLC  */;
        }
 
        public void set_update_fail_malformed_htlcs(UpdateFailMalformedHTLC[] val) {
-               bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, (number[])Arrays.stream(val).map(arr_conv_25 -> arr_conv_25 == null ? 0 : arr_conv_25.ptr & ~1).toArray());
+               bindings.CommitmentUpdate_set_update_fail_malformed_htlcs(this.ptr, Arrays.stream(val).map(val_conv_25 -> val_conv_25 == null ? 0 : val_conv_25.ptr & ~1).toArray(number[]::new));
                /* TODO 2 UpdateFailMalformedHTLC  */;
        }
 
@@ -70,7 +63,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public static CommitmentUpdate constructor_new(UpdateAddHTLC[] update_add_htlcs_arg, UpdateFulfillHTLC[] update_fulfill_htlcs_arg, UpdateFailHTLC[] update_fail_htlcs_arg, UpdateFailMalformedHTLC[] update_fail_malformed_htlcs_arg, UpdateFee update_fee_arg, CommitmentSigned commitment_signed_arg) {
-               number ret = bindings.CommitmentUpdate_new((number[])Arrays.stream(update_add_htlcs_arg).map(arr_conv_15 -> arr_conv_15 == null ? 0 : arr_conv_15.ptr & ~1).toArray(), (number[])Arrays.stream(update_fulfill_htlcs_arg).map(arr_conv_19 -> arr_conv_19 == null ? 0 : arr_conv_19.ptr & ~1).toArray(), (number[])Arrays.stream(update_fail_htlcs_arg).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray(), (number[])Arrays.stream(update_fail_malformed_htlcs_arg).map(arr_conv_25 -> arr_conv_25 == null ? 0 : arr_conv_25.ptr & ~1).toArray(), update_fee_arg == null ? 0 : update_fee_arg.ptr & ~1, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr & ~1);
+               number ret = bindings.CommitmentUpdate_new(Arrays.stream(update_add_htlcs_arg).map(update_add_htlcs_arg_conv_15 -> update_add_htlcs_arg_conv_15 == null ? 0 : update_add_htlcs_arg_conv_15.ptr & ~1).toArray(number[]::new), Arrays.stream(update_fulfill_htlcs_arg).map(update_fulfill_htlcs_arg_conv_19 -> update_fulfill_htlcs_arg_conv_19 == null ? 0 : update_fulfill_htlcs_arg_conv_19.ptr & ~1).toArray(number[]::new), Arrays.stream(update_fail_htlcs_arg).map(update_fail_htlcs_arg_conv_16 -> update_fail_htlcs_arg_conv_16 == null ? 0 : update_fail_htlcs_arg_conv_16.ptr & ~1).toArray(number[]::new), Arrays.stream(update_fail_malformed_htlcs_arg).map(update_fail_malformed_htlcs_arg_conv_25 -> update_fail_malformed_htlcs_arg_conv_25 == null ? 0 : update_fail_malformed_htlcs_arg_conv_25.ptr & ~1).toArray(number[]::new), update_fee_arg == null ? 0 : update_fee_arg.ptr & ~1, commitment_signed_arg == null ? 0 : commitment_signed_arg.ptr & ~1);
                const ret_hu_conv: CommitmentUpdate = new CommitmentUpdate(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                /* TODO 2 UpdateAddHTLC  */;
@@ -82,4 +75,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public CommitmentUpdate clone() {
+               number ret = bindings.CommitmentUpdate_clone(this.ptr);
+               const ret_hu_conv: CommitmentUpdate = new CommitmentUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index de6a67b8318b215bb6ad705c68d1d734297cb6c0..c30efd9689edd9b82fbff88886eaf35c3be8b3cd 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.CounterpartyChannelTransactionParameters_free(this.ptr);
                     }
                 }
-       public CounterpartyChannelTransactionParameters clone() {
-               number ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr);
-               const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelPublicKeys get_pubkeys() {
                number ret = bindings.CounterpartyChannelTransactionParameters_get_pubkeys(this.ptr);
                const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
@@ -54,15 +47,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public CounterpartyChannelTransactionParameters clone() {
+               number ret = bindings.CounterpartyChannelTransactionParameters_clone(this.ptr);
+               const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.CounterpartyChannelTransactionParameters_write(this.ptr);
                return ret;
        }
 
-       public static CounterpartyChannelTransactionParameters constructor_read(Uint8Array ser) {
+       public static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.CounterpartyChannelTransactionParameters_read(ser);
-               const ret_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_CounterpartyChannelTransactionParametersDecodeErrorZ ret_hu_conv = Result_CounterpartyChannelTransactionParametersDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a08c831a6c1edbbf3459496b74900005c24721ad..4f9bd46a084424fc1d1f784d542147c342075b4c 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.DataLossProtect_free(this.ptr);
                     }
                 }
-       public DataLossProtect clone() {
-               number ret = bindings.DataLossProtect_clone(this.ptr);
-               const ret_hu_conv: DataLossProtect = new DataLossProtect(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_your_last_per_commitment_secret() {
                Uint8Array ret = bindings.DataLossProtect_get_your_last_per_commitment_secret(this.ptr);
                return ret;
@@ -50,4 +43,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public DataLossProtect clone() {
+               number ret = bindings.DataLossProtect_clone(this.ptr);
+               const ret_hu_conv: DataLossProtect = new DataLossProtect(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
diff --git a/ts/structs/DelayedPaymentOutputDescriptor.ts b/ts/structs/DelayedPaymentOutputDescriptor.ts
new file mode 100644 (file)
index 0000000..f6cdf76
--- /dev/null
@@ -0,0 +1,97 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class DelayedPaymentOutputDescriptor extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.DelayedPaymentOutputDescriptor_free(this.ptr);
+                    }
+                }
+       public OutPoint get_outpoint() {
+               number ret = bindings.DelayedPaymentOutputDescriptor_get_outpoint(this.ptr);
+               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_outpoint(OutPoint val) {
+               bindings.DelayedPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
+               this.ptrs_to.add(val);
+       }
+
+       public Uint8Array get_per_commitment_point() {
+               Uint8Array ret = bindings.DelayedPaymentOutputDescriptor_get_per_commitment_point(this.ptr);
+               return ret;
+       }
+
+       public void set_per_commitment_point(Uint8Array val) {
+               bindings.DelayedPaymentOutputDescriptor_set_per_commitment_point(this.ptr, val);
+       }
+
+       public number get_to_self_delay() {
+               number ret = bindings.DelayedPaymentOutputDescriptor_get_to_self_delay(this.ptr);
+               return ret;
+       }
+
+       public void set_to_self_delay(number val) {
+               bindings.DelayedPaymentOutputDescriptor_set_to_self_delay(this.ptr, val);
+       }
+
+       public void set_output(TxOut val) {
+               bindings.DelayedPaymentOutputDescriptor_set_output(this.ptr, val.ptr);
+       }
+
+       public Uint8Array get_revocation_pubkey() {
+               Uint8Array ret = bindings.DelayedPaymentOutputDescriptor_get_revocation_pubkey(this.ptr);
+               return ret;
+       }
+
+       public void set_revocation_pubkey(Uint8Array val) {
+               bindings.DelayedPaymentOutputDescriptor_set_revocation_pubkey(this.ptr, val);
+       }
+
+       public Uint8Array get_channel_keys_id() {
+               Uint8Array ret = bindings.DelayedPaymentOutputDescriptor_get_channel_keys_id(this.ptr);
+               return ret;
+       }
+
+       public void set_channel_keys_id(Uint8Array val) {
+               bindings.DelayedPaymentOutputDescriptor_set_channel_keys_id(this.ptr, val);
+       }
+
+       public number get_channel_value_satoshis() {
+               number ret = bindings.DelayedPaymentOutputDescriptor_get_channel_value_satoshis(this.ptr);
+               return ret;
+       }
+
+       public void set_channel_value_satoshis(number val) {
+               bindings.DelayedPaymentOutputDescriptor_set_channel_value_satoshis(this.ptr, val);
+       }
+
+       public static DelayedPaymentOutputDescriptor constructor_new(OutPoint outpoint_arg, Uint8Array per_commitment_point_arg, number to_self_delay_arg, TxOut output_arg, Uint8Array revocation_pubkey_arg, Uint8Array channel_keys_id_arg, number channel_value_satoshis_arg) {
+               number ret = bindings.DelayedPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, per_commitment_point_arg, to_self_delay_arg, output_arg.ptr, revocation_pubkey_arg, channel_keys_id_arg, channel_value_satoshis_arg);
+               const ret_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(outpoint_arg);
+               return ret_hu_conv;
+       }
+
+       public DelayedPaymentOutputDescriptor clone() {
+               number ret = bindings.DelayedPaymentOutputDescriptor_clone(this.ptr);
+               const ret_hu_conv: DelayedPaymentOutputDescriptor = new DelayedPaymentOutputDescriptor(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}
index 5866e91333e19ba91f17515091c8a821c153e807..903e56ecf2d4cb64b25fffad37b6cf2d64099542 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.DirectionalChannelInfo_free(this.ptr);
                     }
                 }
-       public DirectionalChannelInfo clone() {
-               number ret = bindings.DirectionalChannelInfo_clone(this.ptr);
-               const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_last_update() {
                number ret = bindings.DirectionalChannelInfo_get_last_update(this.ptr);
                return ret;
@@ -85,15 +78,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                this.ptrs_to.add(val);
        }
 
+       public DirectionalChannelInfo clone() {
+               number ret = bindings.DirectionalChannelInfo_clone(this.ptr);
+               const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.DirectionalChannelInfo_write(this.ptr);
                return ret;
        }
 
-       public static DirectionalChannelInfo constructor_read(Uint8Array ser) {
+       public static Result_DirectionalChannelInfoDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.DirectionalChannelInfo_read(ser);
-               const ret_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_DirectionalChannelInfoDecodeErrorZ ret_hu_conv = Result_DirectionalChannelInfoDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 4ad554f5a5305dd9cd7114e882b769a287106579..b3b05b1cb28dfc819a35da8981898360c0d94235 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ErrorMessage_free(this.ptr);
                     }
                 }
-       public ErrorMessage clone() {
-               number ret = bindings.ErrorMessage_clone(this.ptr);
-               const ret_hu_conv: ErrorMessage = new ErrorMessage(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.ErrorMessage_get_channel_id(this.ptr);
                return ret;
@@ -50,6 +43,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ErrorMessage clone() {
+               number ret = bindings.ErrorMessage_clone(this.ptr);
+               const ret_hu_conv: ErrorMessage = new ErrorMessage(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.ErrorMessage_write(this.ptr);
                return ret;
diff --git a/ts/structs/ErroringMessageHandler.ts b/ts/structs/ErroringMessageHandler.ts
new file mode 100644 (file)
index 0000000..b5c2f8b
--- /dev/null
@@ -0,0 +1,42 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class ErroringMessageHandler extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.ErroringMessageHandler_free(this.ptr);
+                    }
+                }
+       public static ErroringMessageHandler constructor_new() {
+               number ret = bindings.ErroringMessageHandler_new();
+               const ret_hu_conv: ErroringMessageHandler = new ErroringMessageHandler(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public MessageSendEventsProvider as_MessageSendEventsProvider() {
+               number ret = bindings.ErroringMessageHandler_as_MessageSendEventsProvider(this.ptr);
+               MessageSendEventsProvider ret_hu_conv = new MessageSendEventsProvider(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public ChannelMessageHandler as_ChannelMessageHandler() {
+               number ret = bindings.ErroringMessageHandler_as_ChannelMessageHandler(this.ptr);
+               ChannelMessageHandler ret_hu_conv = new ChannelMessageHandler(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}
index 110456b099268f9eefaef08ffe4b6a232eace1ab..e24c66e20e3d3e0f0d596a13eca74746dc341a56 100644 (file)
@@ -99,13 +99,13 @@ export class SpendableOutputs extends Event {
        private constructor(ptr: number, obj: bindings.LDKEvent.SpendableOutputs) {
                super(null, ptr);
                const outputs: number[] = obj.outputs;
-               SpendableOutputDescriptor[] arr_conv_27_arr = new SpendableOutputDescriptor[outputs.length];
+               SpendableOutputDescriptor[] outputs_conv_27_arr = new SpendableOutputDescriptor[outputs.length];
                        for (int b = 0; b < outputs.length; b++) {
-                               number arr_conv_27 = outputs[b];
-                               SpendableOutputDescriptor arr_conv_27_hu_conv = SpendableOutputDescriptor.constr_from_ptr(arr_conv_27);
-                               arr_conv_27_hu_conv.ptrs_to.add(this);
-                               arr_conv_27_arr[b] = arr_conv_27_hu_conv;
+                               number outputs_conv_27 = outputs[b];
+                               SpendableOutputDescriptor outputs_conv_27_hu_conv = SpendableOutputDescriptor.constr_from_ptr(outputs_conv_27);
+                               outputs_conv_27_hu_conv.ptrs_to.add(this);
+                               outputs_conv_27_arr[b] = outputs_conv_27_hu_conv;
                        }
-               this.outputs = arr_conv_27_arr;
+               this.outputs = outputs_conv_27_arr;
        }
 }
index 111c2a5b9cb8d5ad5c5455b868f6fb5857ef25e0..5cec1ec3959d7f0740d3493c25ad5a7728339172 100644 (file)
@@ -34,7 +34,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                         // todo: in-line interface filling
                         get_and_clear_pending_events (): number[] {
                                                        Event[] ret = arg.get_and_clear_pending_events();
-                               result: number[] = (number[])Arrays.stream(ret).map(arr_conv_7 -> arr_conv_7.ptr).toArray();
+                               result: number[] = Arrays.stream(ret).map(ret_conv_7 -> ret_conv_7.ptr).toArray(number[]::new);
                                /* TODO 2 Event  */;
                                return result;
                                                },
@@ -55,14 +55,14 @@ import * as bindings from '../bindings' // TODO: figure out location
             }
        public Event[] get_and_clear_pending_events() {
                number[] ret = bindings.EventsProvider_get_and_clear_pending_events(this.ptr);
-               Event[] arr_conv_7_arr = new Event[ret.length];
+               Event[] ret_conv_7_arr = new Event[ret.length];
                for (int h = 0; h < ret.length; h++) {
-                       number arr_conv_7 = ret[h];
-                       Event arr_conv_7_hu_conv = Event.constr_from_ptr(arr_conv_7);
-                       arr_conv_7_hu_conv.ptrs_to.add(this);
-                       arr_conv_7_arr[h] = arr_conv_7_hu_conv;
+                       number ret_conv_7 = ret[h];
+                       Event ret_conv_7_hu_conv = Event.constr_from_ptr(ret_conv_7);
+                       ret_conv_7_hu_conv.ptrs_to.add(this);
+                       ret_conv_7_arr[h] = ret_conv_7_hu_conv;
                }
-               return arr_conv_7_arr;
+               return ret_conv_7_arr;
        }
 
 }
index 118811fde7f08eec1562deb9f292b937690b2ecd..a04f078135553e9ac28d51e7a767f90df36b63d3 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.FundingCreated_free(this.ptr);
                     }
                 }
-       public FundingCreated clone() {
-               number ret = bindings.FundingCreated_clone(this.ptr);
-               const ret_hu_conv: FundingCreated = new FundingCreated(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_temporary_channel_id() {
                Uint8Array ret = bindings.FundingCreated_get_temporary_channel_id(this.ptr);
                return ret;
@@ -68,15 +61,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public FundingCreated clone() {
+               number ret = bindings.FundingCreated_clone(this.ptr);
+               const ret_hu_conv: FundingCreated = new FundingCreated(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.FundingCreated_write(this.ptr);
                return ret;
        }
 
-       public static FundingCreated constructor_read(Uint8Array ser) {
+       public static Result_FundingCreatedDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.FundingCreated_read(ser);
-               const ret_hu_conv: FundingCreated = new FundingCreated(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingCreatedDecodeErrorZ ret_hu_conv = Result_FundingCreatedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index b298b222e54da9ac1b911cae8adabd23d07a50bc..e03acf3e3dff529d69fa34b31ee4e25e1f6219c8 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.FundingLocked_free(this.ptr);
                     }
                 }
-       public FundingLocked clone() {
-               number ret = bindings.FundingLocked_clone(this.ptr);
-               const ret_hu_conv: FundingLocked = new FundingLocked(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.FundingLocked_get_channel_id(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public FundingLocked clone() {
+               number ret = bindings.FundingLocked_clone(this.ptr);
+               const ret_hu_conv: FundingLocked = new FundingLocked(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.FundingLocked_write(this.ptr);
                return ret;
        }
 
-       public static FundingLocked constructor_read(Uint8Array ser) {
+       public static Result_FundingLockedDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.FundingLocked_read(ser);
-               const ret_hu_conv: FundingLocked = new FundingLocked(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingLockedDecodeErrorZ ret_hu_conv = Result_FundingLockedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 76fc8ad29620d3d44ee6889fbe40fad4be2ba0a9..a0271f1a7a70c90be695b51ed288ae9b681c069e 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.FundingSigned_free(this.ptr);
                     }
                 }
-       public FundingSigned clone() {
-               number ret = bindings.FundingSigned_clone(this.ptr);
-               const ret_hu_conv: FundingSigned = new FundingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.FundingSigned_get_channel_id(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public FundingSigned clone() {
+               number ret = bindings.FundingSigned_clone(this.ptr);
+               const ret_hu_conv: FundingSigned = new FundingSigned(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.FundingSigned_write(this.ptr);
                return ret;
        }
 
-       public static FundingSigned constructor_read(Uint8Array ser) {
+       public static Result_FundingSignedDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.FundingSigned_read(ser);
-               const ret_hu_conv: FundingSigned = new FundingSigned(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_FundingSignedDecodeErrorZ ret_hu_conv = Result_FundingSignedDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 8b2e3320594928a1aa4cd9d91034e7859a26cb27..a6557572b42bc6e890d81fdf9583f3ec9e887e86 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.GossipTimestampFilter_free(this.ptr);
                     }
                 }
-       public GossipTimestampFilter clone() {
-               number ret = bindings.GossipTimestampFilter_clone(this.ptr);
-               const ret_hu_conv: GossipTimestampFilter = new GossipTimestampFilter(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.GossipTimestampFilter_get_chain_hash(this.ptr);
                return ret;
@@ -59,6 +52,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public GossipTimestampFilter clone() {
+               number ret = bindings.GossipTimestampFilter_clone(this.ptr);
+               const ret_hu_conv: GossipTimestampFilter = new GossipTimestampFilter(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_GossipTimestampFilterDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.GossipTimestampFilter_read(ser);
                Result_GossipTimestampFilterDecodeErrorZ ret_hu_conv = Result_GossipTimestampFilterDecodeErrorZ.constr_from_ptr(ret);
index 545685e5aaf153ee4a370aa2731e12b230a3a25e..42c2eccff62474343a4c46935a713f66b71336ff 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.HTLCOutputInCommitment_free(this.ptr);
                     }
                 }
-       public HTLCOutputInCommitment clone() {
-               number ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
-               const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public boolean get_offered() {
                boolean ret = bindings.HTLCOutputInCommitment_get_offered(this.ptr);
                return ret;
@@ -61,15 +54,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.HTLCOutputInCommitment_set_payment_hash(this.ptr, val);
        }
 
+       public HTLCOutputInCommitment clone() {
+               number ret = bindings.HTLCOutputInCommitment_clone(this.ptr);
+               const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.HTLCOutputInCommitment_write(this.ptr);
                return ret;
        }
 
-       public static HTLCOutputInCommitment constructor_read(Uint8Array ser) {
+       public static Result_HTLCOutputInCommitmentDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.HTLCOutputInCommitment_read(ser);
-               const ret_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HTLCOutputInCommitmentDecodeErrorZ ret_hu_conv = Result_HTLCOutputInCommitmentDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 075dc2db1e94d13708282a58907ef2a7883245a0..3eaef5532f1a26052442c082f54cff93ddcd4ca3 100644 (file)
@@ -30,10 +30,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static HTLCUpdate constructor_read(Uint8Array ser) {
+       public static Result_HTLCUpdateDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.HTLCUpdate_read(ser);
-               const ret_hu_conv: HTLCUpdate = new HTLCUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HTLCUpdateDecodeErrorZ ret_hu_conv = Result_HTLCUpdateDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 4014c3a2a54fa1e4e12e88614266c443458da44a..15ce4e0028ec73bc03f48c7801415e7d4560fc58 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.HolderCommitmentTransaction_free(this.ptr);
                     }
                 }
-       public HolderCommitmentTransaction clone() {
-               number ret = bindings.HolderCommitmentTransaction_clone(this.ptr);
-               const ret_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_counterparty_sig() {
                Uint8Array ret = bindings.HolderCommitmentTransaction_get_counterparty_sig(this.ptr);
                return ret;
@@ -38,15 +31,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.HolderCommitmentTransaction_set_counterparty_htlc_sigs(this.ptr, val);
        }
 
+       public HolderCommitmentTransaction clone() {
+               number ret = bindings.HolderCommitmentTransaction_clone(this.ptr);
+               const ret_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.HolderCommitmentTransaction_write(this.ptr);
                return ret;
        }
 
-       public static HolderCommitmentTransaction constructor_read(Uint8Array ser) {
+       public static Result_HolderCommitmentTransactionDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.HolderCommitmentTransaction_read(ser);
-               const ret_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_HolderCommitmentTransactionDecodeErrorZ ret_hu_conv = Result_HolderCommitmentTransactionDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
diff --git a/ts/structs/IgnoringMessageHandler.ts b/ts/structs/IgnoringMessageHandler.ts
new file mode 100644 (file)
index 0000000..934a356
--- /dev/null
@@ -0,0 +1,42 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class IgnoringMessageHandler extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.IgnoringMessageHandler_free(this.ptr);
+                    }
+                }
+       public static IgnoringMessageHandler constructor_new() {
+               number ret = bindings.IgnoringMessageHandler_new();
+               const ret_hu_conv: IgnoringMessageHandler = new IgnoringMessageHandler(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public MessageSendEventsProvider as_MessageSendEventsProvider() {
+               number ret = bindings.IgnoringMessageHandler_as_MessageSendEventsProvider(this.ptr);
+               MessageSendEventsProvider ret_hu_conv = new MessageSendEventsProvider(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public RoutingMessageHandler as_RoutingMessageHandler() {
+               number ret = bindings.IgnoringMessageHandler_as_RoutingMessageHandler(this.ptr);
+               RoutingMessageHandler ret_hu_conv = new RoutingMessageHandler(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}
diff --git a/ts/structs/InMemoryChannelKeys.ts b/ts/structs/InMemoryChannelKeys.ts
deleted file mode 100644 (file)
index 11321cb..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-
-            
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-
-
-            export default class InMemoryChannelKeys extends CommonBase {
-                constructor(_dummy: object, ptr: number) {
-                    super(ptr);
-                }
-
-                
-                protected finalize() {
-                    super.finalize();
-
-                    if (this.ptr != 0) {
-                        bindings.InMemoryChannelKeys_free(this.ptr);
-                    }
-                }
-       public InMemoryChannelKeys clone() {
-               number ret = bindings.InMemoryChannelKeys_clone(this.ptr);
-               const ret_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public Uint8Array get_funding_key() {
-               Uint8Array ret = bindings.InMemoryChannelKeys_get_funding_key(this.ptr);
-               return ret;
-       }
-
-       public void set_funding_key(Uint8Array val) {
-               bindings.InMemoryChannelKeys_set_funding_key(this.ptr, val);
-       }
-
-       public Uint8Array get_revocation_base_key() {
-               Uint8Array ret = bindings.InMemoryChannelKeys_get_revocation_base_key(this.ptr);
-               return ret;
-       }
-
-       public void set_revocation_base_key(Uint8Array val) {
-               bindings.InMemoryChannelKeys_set_revocation_base_key(this.ptr, val);
-       }
-
-       public Uint8Array get_payment_key() {
-               Uint8Array ret = bindings.InMemoryChannelKeys_get_payment_key(this.ptr);
-               return ret;
-       }
-
-       public void set_payment_key(Uint8Array val) {
-               bindings.InMemoryChannelKeys_set_payment_key(this.ptr, val);
-       }
-
-       public Uint8Array get_delayed_payment_base_key() {
-               Uint8Array ret = bindings.InMemoryChannelKeys_get_delayed_payment_base_key(this.ptr);
-               return ret;
-       }
-
-       public void set_delayed_payment_base_key(Uint8Array val) {
-               bindings.InMemoryChannelKeys_set_delayed_payment_base_key(this.ptr, val);
-       }
-
-       public Uint8Array get_htlc_base_key() {
-               Uint8Array ret = bindings.InMemoryChannelKeys_get_htlc_base_key(this.ptr);
-               return ret;
-       }
-
-       public void set_htlc_base_key(Uint8Array val) {
-               bindings.InMemoryChannelKeys_set_htlc_base_key(this.ptr, val);
-       }
-
-       public Uint8Array get_commitment_seed() {
-               Uint8Array ret = bindings.InMemoryChannelKeys_get_commitment_seed(this.ptr);
-               return ret;
-       }
-
-       public void set_commitment_seed(Uint8Array val) {
-               bindings.InMemoryChannelKeys_set_commitment_seed(this.ptr, val);
-       }
-
-       public static InMemoryChannelKeys constructor_new(Uint8Array funding_key, Uint8Array revocation_base_key, Uint8Array payment_key, Uint8Array delayed_payment_base_key, Uint8Array htlc_base_key, Uint8Array commitment_seed, number channel_value_satoshis, TwoTuple<Number, Number> key_derivation_params) {
-               number ret = bindings.InMemoryChannelKeys_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, bindings.C2Tuple_u64u64Z_new(key_derivation_params.a, key_derivation_params.b));
-               const ret_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               return ret_hu_conv;
-       }
-
-       public ChannelPublicKeys counterparty_pubkeys() {
-               number ret = bindings.InMemoryChannelKeys_counterparty_pubkeys(this.ptr);
-               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public number counterparty_selected_contest_delay() {
-               number ret = bindings.InMemoryChannelKeys_counterparty_selected_contest_delay(this.ptr);
-               return ret;
-       }
-
-       public number holder_selected_contest_delay() {
-               number ret = bindings.InMemoryChannelKeys_holder_selected_contest_delay(this.ptr);
-               return ret;
-       }
-
-       public boolean is_outbound() {
-               boolean ret = bindings.InMemoryChannelKeys_is_outbound(this.ptr);
-               return ret;
-       }
-
-       public OutPoint funding_outpoint() {
-               number ret = bindings.InMemoryChannelKeys_funding_outpoint(this.ptr);
-               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public ChannelTransactionParameters get_channel_parameters() {
-               number ret = bindings.InMemoryChannelKeys_get_channel_parameters(this.ptr);
-               const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public ChannelKeys as_ChannelKeys() {
-               number ret = bindings.InMemoryChannelKeys_as_ChannelKeys(this.ptr);
-               ChannelKeys ret_hu_conv = new ChannelKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
-       public Uint8Array write() {
-               Uint8Array ret = bindings.InMemoryChannelKeys_write(this.ptr);
-               return ret;
-       }
-
-       public static Result_InMemoryChannelKeysDecodeErrorZ constructor_read(Uint8Array ser) {
-               number ret = bindings.InMemoryChannelKeys_read(ser);
-               Result_InMemoryChannelKeysDecodeErrorZ ret_hu_conv = Result_InMemoryChannelKeysDecodeErrorZ.constr_from_ptr(ret);
-               return ret_hu_conv;
-       }
-
-}
diff --git a/ts/structs/InMemorySigner.ts b/ts/structs/InMemorySigner.ts
new file mode 100644 (file)
index 0000000..75b0f86
--- /dev/null
@@ -0,0 +1,157 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class InMemorySigner extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.InMemorySigner_free(this.ptr);
+                    }
+                }
+       public Uint8Array get_funding_key() {
+               Uint8Array ret = bindings.InMemorySigner_get_funding_key(this.ptr);
+               return ret;
+       }
+
+       public void set_funding_key(Uint8Array val) {
+               bindings.InMemorySigner_set_funding_key(this.ptr, val);
+       }
+
+       public Uint8Array get_revocation_base_key() {
+               Uint8Array ret = bindings.InMemorySigner_get_revocation_base_key(this.ptr);
+               return ret;
+       }
+
+       public void set_revocation_base_key(Uint8Array val) {
+               bindings.InMemorySigner_set_revocation_base_key(this.ptr, val);
+       }
+
+       public Uint8Array get_payment_key() {
+               Uint8Array ret = bindings.InMemorySigner_get_payment_key(this.ptr);
+               return ret;
+       }
+
+       public void set_payment_key(Uint8Array val) {
+               bindings.InMemorySigner_set_payment_key(this.ptr, val);
+       }
+
+       public Uint8Array get_delayed_payment_base_key() {
+               Uint8Array ret = bindings.InMemorySigner_get_delayed_payment_base_key(this.ptr);
+               return ret;
+       }
+
+       public void set_delayed_payment_base_key(Uint8Array val) {
+               bindings.InMemorySigner_set_delayed_payment_base_key(this.ptr, val);
+       }
+
+       public Uint8Array get_htlc_base_key() {
+               Uint8Array ret = bindings.InMemorySigner_get_htlc_base_key(this.ptr);
+               return ret;
+       }
+
+       public void set_htlc_base_key(Uint8Array val) {
+               bindings.InMemorySigner_set_htlc_base_key(this.ptr, val);
+       }
+
+       public Uint8Array get_commitment_seed() {
+               Uint8Array ret = bindings.InMemorySigner_get_commitment_seed(this.ptr);
+               return ret;
+       }
+
+       public void set_commitment_seed(Uint8Array val) {
+               bindings.InMemorySigner_set_commitment_seed(this.ptr, val);
+       }
+
+       public InMemorySigner clone() {
+               number ret = bindings.InMemorySigner_clone(this.ptr);
+               const ret_hu_conv: InMemorySigner = new InMemorySigner(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static InMemorySigner constructor_new(Uint8Array funding_key, Uint8Array revocation_base_key, Uint8Array payment_key, Uint8Array delayed_payment_base_key, Uint8Array htlc_base_key, Uint8Array commitment_seed, number channel_value_satoshis, Uint8Array channel_keys_id) {
+               number ret = bindings.InMemorySigner_new(funding_key, revocation_base_key, payment_key, delayed_payment_base_key, htlc_base_key, commitment_seed, channel_value_satoshis, channel_keys_id);
+               const ret_hu_conv: InMemorySigner = new InMemorySigner(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public ChannelPublicKeys counterparty_pubkeys() {
+               number ret = bindings.InMemorySigner_counterparty_pubkeys(this.ptr);
+               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public number counterparty_selected_contest_delay() {
+               number ret = bindings.InMemorySigner_counterparty_selected_contest_delay(this.ptr);
+               return ret;
+       }
+
+       public number holder_selected_contest_delay() {
+               number ret = bindings.InMemorySigner_holder_selected_contest_delay(this.ptr);
+               return ret;
+       }
+
+       public boolean is_outbound() {
+               boolean ret = bindings.InMemorySigner_is_outbound(this.ptr);
+               return ret;
+       }
+
+       public OutPoint funding_outpoint() {
+               number ret = bindings.InMemorySigner_funding_outpoint(this.ptr);
+               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public ChannelTransactionParameters get_channel_parameters() {
+               number ret = bindings.InMemorySigner_get_channel_parameters(this.ptr);
+               const ret_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public Result_CVec_CVec_u8ZZNoneZ sign_counterparty_payment_input(Uint8Array spend_tx, number input_idx, StaticPaymentOutputDescriptor descriptor) {
+               number ret = bindings.InMemorySigner_sign_counterparty_payment_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr & ~1);
+               Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(descriptor);
+               return ret_hu_conv;
+       }
+
+       public Result_CVec_CVec_u8ZZNoneZ sign_dynamic_p2wsh_input(Uint8Array spend_tx, number input_idx, DelayedPaymentOutputDescriptor descriptor) {
+               number ret = bindings.InMemorySigner_sign_dynamic_p2wsh_input(this.ptr, spend_tx, input_idx, descriptor == null ? 0 : descriptor.ptr & ~1);
+               Result_CVec_CVec_u8ZZNoneZ ret_hu_conv = Result_CVec_CVec_u8ZZNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(descriptor);
+               return ret_hu_conv;
+       }
+
+       public Sign as_Sign() {
+               number ret = bindings.InMemorySigner_as_Sign(this.ptr);
+               Sign ret_hu_conv = new Sign(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.InMemorySigner_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_InMemorySignerDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.InMemorySigner_read(ser);
+               Result_InMemorySignerDecodeErrorZ ret_hu_conv = Result_InMemorySignerDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+}
index f396b0bf80b8ef89cf98c6cde28cfbed4653fcd1..b8ca1522ccb2f4cfc6e7a79f9dd98d035aea6282 100644 (file)
@@ -18,6 +18,26 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.Init_free(this.ptr);
                     }
                 }
+       public InitFeatures get_features() {
+               number ret = bindings.Init_get_features(this.ptr);
+               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_features(InitFeatures val) {
+               bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
+               this.ptrs_to.add(val);
+       }
+
+       public static Init constructor_new(InitFeatures features_arg) {
+               number ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr & ~1);
+               const ret_hu_conv: Init = new Init(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(features_arg);
+               return ret_hu_conv;
+       }
+
        public Init clone() {
                number ret = bindings.Init_clone(this.ptr);
                const ret_hu_conv: Init = new Init(null, ret);
index e38641d2b125df40d1480d203ab87d4b6080d0da..a1dee177b6f29e323198b89d3717e89e5386b955 100644 (file)
@@ -18,4 +18,36 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.InitFeatures_free(this.ptr);
                     }
                 }
+       public InitFeatures clone() {
+               number ret = bindings.InitFeatures_clone(this.ptr);
+               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static InitFeatures constructor_empty() {
+               number ret = bindings.InitFeatures_empty();
+               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static InitFeatures constructor_known() {
+               number ret = bindings.InitFeatures_known();
+               const ret_hu_conv: InitFeatures = new InitFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.InitFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_InitFeaturesDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.InitFeatures_read(ser);
+               Result_InitFeaturesDecodeErrorZ ret_hu_conv = Result_InitFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index c51f0b8b59d2aa323f2fa0936afaf86805a5a271..a49aaf0b516fc4f0495771273c2952afc2f88a18 100644 (file)
@@ -47,8 +47,8 @@ import * as bindings from '../bindings' // TODO: figure out location
                                return ret;
                                                },
 
-                                               get_channel_keys (inbound: boolean, channel_value_satoshis: number): number {
-                                                       ChannelKeys ret = arg.get_channel_keys(inbound, channel_value_satoshis);
+                                               get_channel_signer (inbound: boolean, channel_value_satoshis: number): number {
+                                                       Sign ret = arg.get_channel_signer(inbound, channel_value_satoshis);
                                result: number = ret == null ? 0 : ret.ptr;
                                impl_holder.held.ptrs_to.add(ret);
                                return result;
@@ -60,7 +60,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                                                },
 
                                                read_chan_signer (reader: Uint8Array): number {
-                                                       Result_ChanKeySignerDecodeErrorZ ret = arg.read_chan_signer(reader);
+                                                       Result_SignDecodeErrorZ ret = arg.read_chan_signer(reader);
                                result: number = ret != null ? ret.ptr : 0;
                                return result;
                                                },
@@ -75,9 +75,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                 get_node_secret(): Uint8Array;
                                get_destination_script(): Uint8Array;
                                get_shutdown_pubkey(): Uint8Array;
-                               get_channel_keys(inbound: boolean, channel_value_satoshis: number): ChannelKeys;
+                               get_channel_signer(inbound: boolean, channel_value_satoshis: number): Sign;
                                get_secure_random_bytes(): Uint8Array;
-                               read_chan_signer(reader: Uint8Array): Result_ChanKeySignerDecodeErrorZ;
+                               read_chan_signer(reader: Uint8Array): Result_SignDecodeErrorZ;
                                
             }
 
@@ -99,9 +99,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public ChannelKeys get_channel_keys(boolean inbound, number channel_value_satoshis) {
-               number ret = bindings.KeysInterface_get_channel_keys(this.ptr, inbound, channel_value_satoshis);
-               ChannelKeys ret_hu_conv = new ChannelKeys(null, ret);
+       public Sign get_channel_signer(boolean inbound, number channel_value_satoshis) {
+               number ret = bindings.KeysInterface_get_channel_signer(this.ptr, inbound, channel_value_satoshis);
+               Sign ret_hu_conv = new Sign(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
@@ -111,9 +111,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public Result_ChanKeySignerDecodeErrorZ read_chan_signer(Uint8Array reader) {
+       public Result_SignDecodeErrorZ read_chan_signer(Uint8Array reader) {
                number ret = bindings.KeysInterface_read_chan_signer(this.ptr, reader);
-               Result_ChanKeySignerDecodeErrorZ ret_hu_conv = Result_ChanKeySignerDecodeErrorZ.constr_from_ptr(ret);
+               Result_SignDecodeErrorZ ret_hu_conv = Result_SignDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 7627c0e399847f5ed75d2ce87b6ca149f7aefee5..c444e1f8800fa73bd05fd7d6748a9bf70b9fd22c 100644 (file)
@@ -18,20 +18,28 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.KeysManager_free(this.ptr);
                     }
                 }
-       public static KeysManager constructor_new(Uint8Array seed, LDKNetwork network, number starting_time_secs, number starting_time_nanos) {
-               number ret = bindings.KeysManager_new(seed, network, starting_time_secs, starting_time_nanos);
+       public static KeysManager constructor_new(Uint8Array seed, number starting_time_secs, number starting_time_nanos) {
+               number ret = bindings.KeysManager_new(seed, starting_time_secs, starting_time_nanos);
                const ret_hu_conv: KeysManager = new KeysManager(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
-       public InMemoryChannelKeys derive_channel_keys(number channel_value_satoshis, number params_1, number params_2) {
-               number ret = bindings.KeysManager_derive_channel_keys(this.ptr, channel_value_satoshis, params_1, params_2);
-               const ret_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, ret);
+       public InMemorySigner derive_channel_keys(number channel_value_satoshis, Uint8Array params) {
+               number ret = bindings.KeysManager_derive_channel_keys(this.ptr, channel_value_satoshis, params);
+               const ret_hu_conv: InMemorySigner = new InMemorySigner(null, ret);
                ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
+       public Result_TransactionNoneZ spend_spendable_outputs(SpendableOutputDescriptor[] descriptors, TxOut[] outputs, Uint8Array change_destination_script, number feerate_sat_per_1000_weight) {
+               number ret = bindings.KeysManager_spend_spendable_outputs(this.ptr, Arrays.stream(descriptors).map(descriptors_conv_27 -> descriptors_conv_27.ptr).toArray(number[]::new), Arrays.stream(outputs).map(outputs_conv_7 -> outputs_conv_7.ptr).toArray(number[]::new), change_destination_script, feerate_sat_per_1000_weight);
+               Result_TransactionNoneZ ret_hu_conv = Result_TransactionNoneZ.constr_from_ptr(ret);
+               /* TODO 2 SpendableOutputDescriptor  */;
+               /* TODO 2 TxOut  */;
+               return ret_hu_conv;
+       }
+
        public KeysInterface as_KeysInterface() {
                number ret = bindings.KeysManager_as_KeysInterface(this.ptr);
                KeysInterface ret_hu_conv = new KeysInterface(null, ret);
index 74b3a586df3cdca31fab736ea032b03ed6660460..8e38be1a8f903408733286f4782bf57fe3de2845 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.LightningError_free(this.ptr);
                     }
                 }
-       public LightningError clone() {
-               number ret = bindings.LightningError_clone(this.ptr);
-               const ret_hu_conv: LightningError = new LightningError(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public String get_err() {
                String ret = bindings.LightningError_get_err(this.ptr);
                return ret;
@@ -52,4 +45,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public LightningError clone() {
+               number ret = bindings.LightningError_clone(this.ptr);
+               const ret_hu_conv: LightningError = new LightningError(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
diff --git a/ts/structs/Listen.ts b/ts/structs/Listen.ts
new file mode 100644 (file)
index 0000000..9e6ad6f
--- /dev/null
@@ -0,0 +1,66 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export class Listen extends CommonBase {
+
+                bindings_instance?: bindings.LDKListen;
+
+                constructor(ptr?: number, arg?: bindings.LDKListen) {
+                    if (Number.isFinite(ptr)) {
+                                       super(ptr);
+                                       this.bindings_instance = null;
+                                   } else {
+                                       // TODO: private constructor instantiation
+                                       super(bindings.LDKListen_new(arg));
+                                       this.ptrs_to.push(arg);
+                                       
+                                   }
+                }
+
+                protected finalize() {
+                    if (this.ptr != 0) {
+                        bindings.Listen_free(this.ptr);
+                    }
+                    super.finalize();
+                }
+
+                static new_impl(arg: ListenInterface): Listen {
+                    const impl_holder: LDKListenHolder = new LDKListenHolder();
+                    let structImplementation = <bindings.LDKListen>{
+                        // todo: in-line interface filling
+                        block_connected (block: Uint8Array, height: number): void {
+                                                       arg.block_connected(block, height);
+                                               },
+
+                                               block_disconnected (header: Uint8Array, height: number): void {
+                                                       arg.block_disconnected(header, height);
+                                               },
+
+                                               
+                    };
+                    impl_holder.held = new Listen (null, structImplementation);
+                }
+            }
+
+            export interface ListenInterface {
+                block_connected(block: Uint8Array, height: number): void;
+                               block_disconnected(header: Uint8Array, height: number): void;
+                               
+            }
+
+            class LDKListenHolder {
+                held: Listen;
+            }
+       public void block_connected(Uint8Array block, number height) {
+               bindings.Listen_block_connected(this.ptr, block, height);
+       }
+
+       public void block_disconnected(Uint8Array header, number height) {
+               bindings.Listen_block_disconnected(this.ptr, header, height);
+       }
+
+}
index 3c05318c081556c21210a3bdfa639e9628231e3b..6b218bb12c0ffab7b317f6b3218dc386e9115416 100644 (file)
@@ -34,7 +34,7 @@ import * as bindings from '../bindings' // TODO: figure out location
                         // todo: in-line interface filling
                         get_and_clear_pending_msg_events (): number[] {
                                                        MessageSendEvent[] ret = arg.get_and_clear_pending_msg_events();
-                               result: number[] = (number[])Arrays.stream(ret).map(arr_conv_18 -> arr_conv_18.ptr).toArray();
+                               result: number[] = Arrays.stream(ret).map(ret_conv_18 -> ret_conv_18.ptr).toArray(number[]::new);
                                /* TODO 2 MessageSendEvent  */;
                                return result;
                                                },
@@ -55,14 +55,14 @@ import * as bindings from '../bindings' // TODO: figure out location
             }
        public MessageSendEvent[] get_and_clear_pending_msg_events() {
                number[] ret = bindings.MessageSendEventsProvider_get_and_clear_pending_msg_events(this.ptr);
-               MessageSendEvent[] arr_conv_18_arr = new MessageSendEvent[ret.length];
+               MessageSendEvent[] ret_conv_18_arr = new MessageSendEvent[ret.length];
                for (int s = 0; s < ret.length; s++) {
-                       number arr_conv_18 = ret[s];
-                       MessageSendEvent arr_conv_18_hu_conv = MessageSendEvent.constr_from_ptr(arr_conv_18);
-                       arr_conv_18_hu_conv.ptrs_to.add(this);
-                       arr_conv_18_arr[s] = arr_conv_18_hu_conv;
+                       number ret_conv_18 = ret[s];
+                       MessageSendEvent ret_conv_18_hu_conv = MessageSendEvent.constr_from_ptr(ret_conv_18);
+                       ret_conv_18_hu_conv.ptrs_to.add(this);
+                       ret_conv_18_arr[s] = ret_conv_18_hu_conv;
                }
-               return arr_conv_18_arr;
+               return ret_conv_18_arr;
        }
 
 }
index b24e66024fc43129f267d4bae029f105da04158f..1a6c1637f42a6cfbfc1cc1347f68aff76bd70085 100644 (file)
@@ -1,28 +1,32 @@
 
-            
 import CommonBase from './CommonBase';
 import * as bindings from '../bindings' // TODO: figure out location
 
-
-
-            export default class MonitorEvent extends CommonBase {
-                constructor(_dummy: object, ptr: number) {
-                    super(ptr);
-                }
-
-                
-                protected finalize() {
-                    super.finalize();
-
-                    if (this.ptr != 0) {
-                        bindings.MonitorEvent_free(this.ptr);
-                    }
-                }
-       public MonitorEvent clone() {
-               number ret = bindings.MonitorEvent_clone(this.ptr);
-               const ret_hu_conv: MonitorEvent = new MonitorEvent(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
+export default class MonitorEvent extends CommonBase {
+       protected constructor(_dummy: object, ptr: number) { super(ptr); }
+       protected finalize() {
+               super.finalize();
+               if (this.ptr != 0) { bindings.MonitorEvent_free(this.ptr); }
+       }
+       static constr_from_ptr(ptr: number): MonitorEvent {
+               const raw_val: bindings.LDKMonitorEvent = bindings.LDKMonitorEvent_ref_from_ptr(ptr);
+               if (raw_val instanceof bindings.LDKMonitorEvent.HTLCEvent) {
+                       return new HTLCEvent(this.ptr, raw_val);
+               }
+               if (raw_val instanceof bindings.LDKMonitorEvent.CommitmentTxBroadcasted) {
+                       return new CommitmentTxBroadcasted(this.ptr, raw_val);
+               }
+               throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
        }
 
 }
+export class HTLCEvent extends MonitorEvent {
+       private constructor(ptr: number, obj: bindings.LDKMonitorEvent.HTLCEvent) {
+               super(null, ptr);
+       }
+}
+export class CommitmentTxBroadcasted extends MonitorEvent {
+       private constructor(ptr: number, obj: bindings.LDKMonitorEvent.CommitmentTxBroadcasted) {
+               super(null, ptr);
+       }
+}
index 5b7cbe89797b17f38f5278959ed27d25da8e55e9..cfcb2d6174c386ba3f7af0573bfc629179072eb0 100644 (file)
@@ -27,15 +27,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
-       public static NetGraphMsgHandler constructor_from_net_graph(Access chain_access, Logger logger, Uint8Array network_graph_genesis_hash) {
-               number ret = bindings.NetGraphMsgHandler_from_net_graph(chain_access == null ? 0 : chain_access.ptr, logger == null ? 0 : logger.ptr, bindings.NetworkGraph_new(network_graph_genesis_hash));
+       public static NetGraphMsgHandler constructor_from_net_graph(Access chain_access, Logger logger, NetworkGraph network_graph) {
+               number ret = bindings.NetGraphMsgHandler_from_net_graph(chain_access == null ? 0 : chain_access.ptr, logger == null ? 0 : logger.ptr, network_graph == null ? 0 : network_graph.ptr & ~1);
                const ret_hu_conv: NetGraphMsgHandler = new NetGraphMsgHandler(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(chain_access);
                ret_hu_conv.ptrs_to.add(logger);
+               ret_hu_conv.ptrs_to.add(network_graph);
                return ret_hu_conv;
        }
 
+       public void add_chain_access(Access chain_access) {
+               bindings.NetGraphMsgHandler_add_chain_access(this.ptr, chain_access == null ? 0 : chain_access.ptr);
+               this.ptrs_to.add(chain_access);
+       }
+
        public LockedNetworkGraph read_locked_graph() {
                number ret = bindings.NetGraphMsgHandler_read_locked_graph(this.ptr);
                const ret_hu_conv: LockedNetworkGraph = new LockedNetworkGraph(null, ret);
index 7f5908816239a63c92d06d93894115133e01a5a9..5d2deab201008ce70819abc98ec940a65a734857 100644 (file)
@@ -18,6 +18,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.NetworkGraph_free(this.ptr);
                     }
                 }
+       public NetworkGraph clone() {
+               number ret = bindings.NetworkGraph_clone(this.ptr);
+               const ret_hu_conv: NetworkGraph = new NetworkGraph(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.NetworkGraph_write(this.ptr);
                return ret;
index 38520e1a781ed57b3d44cb98a94500ff328533c6..bf2a6612556fb6eb2242c88cbd95a408c1bab44c 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.NodeAnnouncement_free(this.ptr);
                     }
                 }
-       public NodeAnnouncement clone() {
-               number ret = bindings.NodeAnnouncement_clone(this.ptr);
-               const ret_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_signature() {
                Uint8Array ret = bindings.NodeAnnouncement_get_signature(this.ptr);
                return ret;
@@ -54,15 +47,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public NodeAnnouncement clone() {
+               number ret = bindings.NodeAnnouncement_clone(this.ptr);
+               const ret_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.NodeAnnouncement_write(this.ptr);
                return ret;
        }
 
-       public static NodeAnnouncement constructor_read(Uint8Array ser) {
+       public static Result_NodeAnnouncementDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.NodeAnnouncement_read(ser);
-               const ret_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_NodeAnnouncementDecodeErrorZ ret_hu_conv = Result_NodeAnnouncementDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 2fa86c39952535472a92783954cb99ef765cb2e8..ff71ce14e793cee4f3a5d9238e75465167b92718 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.NodeAnnouncementInfo_free(this.ptr);
                     }
                 }
-       public NodeAnnouncementInfo clone() {
-               number ret = bindings.NodeAnnouncementInfo_clone(this.ptr);
-               const ret_hu_conv: NodeAnnouncementInfo = new NodeAnnouncementInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public NodeFeatures get_features() {
                number ret = bindings.NodeAnnouncementInfo_get_features(this.ptr);
                const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
@@ -35,14 +28,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_features(NodeFeatures val) {
                bindings.NodeAnnouncementInfo_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public number get_last_update() {
@@ -73,7 +58,7 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void set_addresses(NetAddress[] val) {
-               bindings.NodeAnnouncementInfo_set_addresses(this.ptr, (number[])Arrays.stream(val).map(arr_conv_12 -> arr_conv_12.ptr).toArray());
+               bindings.NodeAnnouncementInfo_set_addresses(this.ptr, Arrays.stream(val).map(val_conv_12 -> val_conv_12.ptr).toArray(number[]::new));
                /* TODO 2 NetAddress  */;
        }
 
@@ -90,23 +75,22 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public static NodeAnnouncementInfo constructor_new(NodeFeatures features_arg, number last_update_arg, Uint8Array rgb_arg, Uint8Array alias_arg, NetAddress[] addresses_arg, NodeAnnouncement announcement_message_arg) {
-               number ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, last_update_arg, rgb_arg, alias_arg, (number[])Arrays.stream(addresses_arg).map(arr_conv_12 -> arr_conv_12.ptr).toArray(), announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
+               number ret = bindings.NodeAnnouncementInfo_new(features_arg == null ? 0 : features_arg.ptr & ~1, last_update_arg, rgb_arg, alias_arg, Arrays.stream(addresses_arg).map(addresses_arg_conv_12 -> addresses_arg_conv_12.ptr).toArray(number[]::new), announcement_message_arg == null ? 0 : announcement_message_arg.ptr & ~1);
                const ret_hu_conv: NodeAnnouncementInfo = new NodeAnnouncementInfo(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(features_arg);
-               // 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, features_arg is reset to null and is now a dummy object.
-               features_arg.ptr = 0;
                /* TODO 2 NetAddress  */;
                ret_hu_conv.ptrs_to.add(announcement_message_arg);
                return ret_hu_conv;
        }
 
+       public NodeAnnouncementInfo clone() {
+               number ret = bindings.NodeAnnouncementInfo_clone(this.ptr);
+               const ret_hu_conv: NodeAnnouncementInfo = new NodeAnnouncementInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.NodeAnnouncementInfo_write(this.ptr);
                return ret;
index d091079f895c994131b7457427ed1c2e2ee713c0..13652f14d720313d86d2b5443342e64ec9770bf6 100644 (file)
@@ -18,4 +18,36 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.NodeFeatures_free(this.ptr);
                     }
                 }
+       public NodeFeatures clone() {
+               number ret = bindings.NodeFeatures_clone(this.ptr);
+               const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public static NodeFeatures constructor_empty() {
+               number ret = bindings.NodeFeatures_empty();
+               const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public static NodeFeatures constructor_known() {
+               number ret = bindings.NodeFeatures_known();
+               const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               return ret_hu_conv;
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.NodeFeatures_write(this.ptr);
+               return ret;
+       }
+
+       public static Result_NodeFeaturesDecodeErrorZ constructor_read(Uint8Array ser) {
+               number ret = bindings.NodeFeatures_read(ser);
+               Result_NodeFeaturesDecodeErrorZ ret_hu_conv = Result_NodeFeaturesDecodeErrorZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
 }
index 0fd77a145007b4aae145fe896540263d67c9d009..f848b0860f601f1650b446e21a334285bc6748ff 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.NodeInfo_free(this.ptr);
                     }
                 }
-       public NodeInfo clone() {
-               number ret = bindings.NodeInfo_clone(this.ptr);
-               const ret_hu_conv: NodeInfo = new NodeInfo(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_channels(number[] val) {
                bindings.NodeInfo_set_channels(this.ptr, val);
        }
@@ -62,6 +55,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public NodeInfo clone() {
+               number ret = bindings.NodeInfo_clone(this.ptr);
+               const ret_hu_conv: NodeInfo = new NodeInfo(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.NodeInfo_write(this.ptr);
                return ret;
index 62485309903da3d06760129a3330def31e62cae5..cbdaf307b0e85c2c02c24d32b72e494e4cc26f03 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.OpenChannel_free(this.ptr);
                     }
                 }
-       public OpenChannel clone() {
-               number ret = bindings.OpenChannel_clone(this.ptr);
-               const ret_hu_conv: OpenChannel = new OpenChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.OpenChannel_get_chain_hash(this.ptr);
                return ret;
@@ -187,15 +180,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.OpenChannel_set_channel_flags(this.ptr, val);
        }
 
+       public OpenChannel clone() {
+               number ret = bindings.OpenChannel_clone(this.ptr);
+               const ret_hu_conv: OpenChannel = new OpenChannel(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.OpenChannel_write(this.ptr);
                return ret;
        }
 
-       public static OpenChannel constructor_read(Uint8Array ser) {
+       public static Result_OpenChannelDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.OpenChannel_read(ser);
-               const ret_hu_conv: OpenChannel = new OpenChannel(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_OpenChannelDecodeErrorZ ret_hu_conv = Result_OpenChannelDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index decbf7b744897d63ce403fff6ea7fbb392b066e8..508f2e13f162b7067031a4b9e20bb39bbd20758a 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.OutPoint_free(this.ptr);
                     }
                 }
-       public OutPoint clone() {
-               number ret = bindings.OutPoint_clone(this.ptr);
-               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_txid() {
                Uint8Array ret = bindings.OutPoint_get_txid(this.ptr);
                return ret;
@@ -50,6 +43,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public OutPoint clone() {
+               number ret = bindings.OutPoint_clone(this.ptr);
+               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array to_channel_id() {
                Uint8Array ret = bindings.OutPoint_to_channel_id(this.ptr);
                return ret;
@@ -60,10 +60,9 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret;
        }
 
-       public static OutPoint constructor_read(Uint8Array ser) {
+       public static Result_OutPointDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.OutPoint_read(ser);
-               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_OutPointDecodeErrorZ ret_hu_conv = Result_OutPointDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 32bef844f5468cd54fae47e522e27a73771382e7..2310a2eea6253363e2ae486a24c9a8532fbf556a 100644 (file)
@@ -1,28 +1,48 @@
 
-            
 import CommonBase from './CommonBase';
 import * as bindings from '../bindings' // TODO: figure out location
 
-
-
-            export default class PaymentSendFailure extends CommonBase {
-                constructor(_dummy: object, ptr: number) {
-                    super(ptr);
-                }
-
-                
-                protected finalize() {
-                    super.finalize();
-
-                    if (this.ptr != 0) {
-                        bindings.PaymentSendFailure_free(this.ptr);
-                    }
-                }
-       public PaymentSendFailure clone() {
-               number ret = bindings.PaymentSendFailure_clone(this.ptr);
-               const ret_hu_conv: PaymentSendFailure = new PaymentSendFailure(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
+export default class PaymentSendFailure extends CommonBase {
+       protected constructor(_dummy: object, ptr: number) { super(ptr); }
+       protected finalize() {
+               super.finalize();
+               if (this.ptr != 0) { bindings.PaymentSendFailure_free(this.ptr); }
+       }
+       static constr_from_ptr(ptr: number): PaymentSendFailure {
+               const raw_val: bindings.LDKPaymentSendFailure = bindings.LDKPaymentSendFailure_ref_from_ptr(ptr);
+               if (raw_val instanceof bindings.LDKPaymentSendFailure.ParameterError) {
+                       return new ParameterError(this.ptr, raw_val);
+               }
+               if (raw_val instanceof bindings.LDKPaymentSendFailure.PathParameterError) {
+                       return new PathParameterError(this.ptr, raw_val);
+               }
+               if (raw_val instanceof bindings.LDKPaymentSendFailure.AllFailedRetrySafe) {
+                       return new AllFailedRetrySafe(this.ptr, raw_val);
+               }
+               if (raw_val instanceof bindings.LDKPaymentSendFailure.PartialFailure) {
+                       return new PartialFailure(this.ptr, raw_val);
+               }
+               throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
        }
 
 }
+export class ParameterError extends PaymentSendFailure {
+       private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.ParameterError) {
+               super(null, ptr);
+       }
+}
+export class PathParameterError extends PaymentSendFailure {
+       private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.PathParameterError) {
+               super(null, ptr);
+       }
+}
+export class AllFailedRetrySafe extends PaymentSendFailure {
+       private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.AllFailedRetrySafe) {
+               super(null, ptr);
+       }
+}
+export class PartialFailure extends PaymentSendFailure {
+       private constructor(ptr: number, obj: bindings.LDKPaymentSendFailure.PartialFailure) {
+               super(null, ptr);
+       }
+}
index 2bae7bb77170e6aa96cc347a18c3a663bfbcdf08..52504971e59ec71a14abaa95c3bb5ada4a63f782 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.PeerHandleError_free(this.ptr);
                     }
                 }
-       public PeerHandleError clone() {
-               number ret = bindings.PeerHandleError_clone(this.ptr);
-               const ret_hu_conv: PeerHandleError = new PeerHandleError(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public boolean get_no_connection_possible() {
                boolean ret = bindings.PeerHandleError_get_no_connection_possible(this.ptr);
                return ret;
@@ -41,4 +34,11 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public PeerHandleError clone() {
+               number ret = bindings.PeerHandleError_clone(this.ptr);
+               const ret_hu_conv: PeerHandleError = new PeerHandleError(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
 }
index 2cc1a913f6ea09dec8fd5849b68a3e35dc76f55c..f7054fe012ae08e2ec003add20f46ebc69e91716 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.Ping_free(this.ptr);
                     }
                 }
-       public Ping clone() {
-               number ret = bindings.Ping_clone(this.ptr);
-               const ret_hu_conv: Ping = new Ping(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_ponglen() {
                number ret = bindings.Ping_get_ponglen(this.ptr);
                return ret;
@@ -50,6 +43,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public Ping clone() {
+               number ret = bindings.Ping_clone(this.ptr);
+               const ret_hu_conv: Ping = new Ping(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.Ping_write(this.ptr);
                return ret;
index 63379926273f973d2bfc6cfb346a819abee8c5c0..58be169f8d101530f3d3079658feebe15c26c260 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.Pong_free(this.ptr);
                     }
                 }
-       public Pong clone() {
-               number ret = bindings.Pong_clone(this.ptr);
-               const ret_hu_conv: Pong = new Pong(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_byteslen() {
                number ret = bindings.Pong_get_byteslen(this.ptr);
                return ret;
@@ -41,6 +34,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public Pong clone() {
+               number ret = bindings.Pong_clone(this.ptr);
+               const ret_hu_conv: Pong = new Pong(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.Pong_write(this.ptr);
                return ret;
index 8b26591c2069fa455071f9bad1850aed88350d36..4a4a6e22dd17013af439d6f5ca2d8721b4524061 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.QueryChannelRange_free(this.ptr);
                     }
                 }
-       public QueryChannelRange clone() {
-               number ret = bindings.QueryChannelRange_clone(this.ptr);
-               const ret_hu_conv: QueryChannelRange = new QueryChannelRange(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.QueryChannelRange_get_chain_hash(this.ptr);
                return ret;
@@ -59,6 +52,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public QueryChannelRange clone() {
+               number ret = bindings.QueryChannelRange_clone(this.ptr);
+               const ret_hu_conv: QueryChannelRange = new QueryChannelRange(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_QueryChannelRangeDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.QueryChannelRange_read(ser);
                Result_QueryChannelRangeDecodeErrorZ ret_hu_conv = Result_QueryChannelRangeDecodeErrorZ.constr_from_ptr(ret);
index 58643a72d147a5cbe96f93300f88fc9f211a971b..fe6f93f900dbb907008d793b0f79ac0b9aae808b 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.QueryShortChannelIds_free(this.ptr);
                     }
                 }
-       public QueryShortChannelIds clone() {
-               number ret = bindings.QueryShortChannelIds_clone(this.ptr);
-               const ret_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.QueryShortChannelIds_get_chain_hash(this.ptr);
                return ret;
@@ -45,6 +38,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public QueryShortChannelIds clone() {
+               number ret = bindings.QueryShortChannelIds_clone(this.ptr);
+               const ret_hu_conv: QueryShortChannelIds = new QueryShortChannelIds(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_QueryShortChannelIdsDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.QueryShortChannelIds_read(ser);
                Result_QueryShortChannelIdsDecodeErrorZ ret_hu_conv = Result_QueryShortChannelIdsDecodeErrorZ.constr_from_ptr(ret);
index 3d2ef1784797bcfc9ed88c6d9946f56bb3272803..bbf199e3ba561afddfcf15dc3b2e33469c2f149b 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ReplyChannelRange_free(this.ptr);
                     }
                 }
-       public ReplyChannelRange clone() {
-               number ret = bindings.ReplyChannelRange_clone(this.ptr);
-               const ret_hu_conv: ReplyChannelRange = new ReplyChannelRange(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.ReplyChannelRange_get_chain_hash(this.ptr);
                return ret;
@@ -52,26 +45,33 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.ReplyChannelRange_set_number_of_blocks(this.ptr, val);
        }
 
-       public boolean get_full_information() {
-               boolean ret = bindings.ReplyChannelRange_get_full_information(this.ptr);
+       public boolean get_sync_complete() {
+               boolean ret = bindings.ReplyChannelRange_get_sync_complete(this.ptr);
                return ret;
        }
 
-       public void set_full_information(boolean val) {
-               bindings.ReplyChannelRange_set_full_information(this.ptr, val);
+       public void set_sync_complete(boolean val) {
+               bindings.ReplyChannelRange_set_sync_complete(this.ptr, val);
        }
 
        public void set_short_channel_ids(number[] val) {
                bindings.ReplyChannelRange_set_short_channel_ids(this.ptr, val);
        }
 
-       public static ReplyChannelRange constructor_new(Uint8Array chain_hash_arg, number first_blocknum_arg, number number_of_blocks_arg, boolean full_information_arg, number[] short_channel_ids_arg) {
-               number ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, full_information_arg, short_channel_ids_arg);
+       public static ReplyChannelRange constructor_new(Uint8Array chain_hash_arg, number first_blocknum_arg, number number_of_blocks_arg, boolean sync_complete_arg, number[] short_channel_ids_arg) {
+               number ret = bindings.ReplyChannelRange_new(chain_hash_arg, first_blocknum_arg, number_of_blocks_arg, sync_complete_arg, short_channel_ids_arg);
                const ret_hu_conv: ReplyChannelRange = new ReplyChannelRange(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                return ret_hu_conv;
        }
 
+       public ReplyChannelRange clone() {
+               number ret = bindings.ReplyChannelRange_clone(this.ptr);
+               const ret_hu_conv: ReplyChannelRange = new ReplyChannelRange(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_ReplyChannelRangeDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ReplyChannelRange_read(ser);
                Result_ReplyChannelRangeDecodeErrorZ ret_hu_conv = Result_ReplyChannelRangeDecodeErrorZ.constr_from_ptr(ret);
index 6b2a21016f83168f97ea214e4195c145f802f98c..ebcb2914a57f061e169eceefff9917aea6c7c5a7 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.ReplyShortChannelIdsEnd_free(this.ptr);
                     }
                 }
-       public ReplyShortChannelIdsEnd clone() {
-               number ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
-               const ret_hu_conv: ReplyShortChannelIdsEnd = new ReplyShortChannelIdsEnd(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.ReplyShortChannelIdsEnd_get_chain_hash(this.ptr);
                return ret;
@@ -50,6 +43,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public ReplyShortChannelIdsEnd clone() {
+               number ret = bindings.ReplyShortChannelIdsEnd_clone(this.ptr);
+               const ret_hu_conv: ReplyShortChannelIdsEnd = new ReplyShortChannelIdsEnd(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_ReplyShortChannelIdsEndDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.ReplyShortChannelIdsEnd_read(ser);
                Result_ReplyShortChannelIdsEndDecodeErrorZ ret_hu_conv = Result_ReplyShortChannelIdsEndDecodeErrorZ.constr_from_ptr(ret);
diff --git a/ts/structs/Result_AcceptChannelDecodeErrorZ.ts b/ts/structs/Result_AcceptChannelDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..ddc5ef5
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_AcceptChannelDecodeErrorZ extends CommonBase {
+       private Result_AcceptChannelDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_AcceptChannelDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_AcceptChannelDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_AcceptChannelDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_AcceptChannelDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_AcceptChannelDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_AcceptChannelDecodeErrorZ_OK extends Result_AcceptChannelDecodeErrorZ {
+               public final AcceptChannel res;
+               private Result_AcceptChannelDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_AcceptChannelDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: AcceptChannel = new AcceptChannel(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_AcceptChannelDecodeErrorZ_OK(AcceptChannel res) {
+                       this(null, bindings.CResult_AcceptChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_AcceptChannelDecodeErrorZ_Err extends Result_AcceptChannelDecodeErrorZ {
+               public final DecodeError err;
+               private Result_AcceptChannelDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_AcceptChannelDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_AcceptChannelDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_AcceptChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_AnnouncementSignaturesDecodeErrorZ.ts b/ts/structs/Result_AnnouncementSignaturesDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..c243244
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_AnnouncementSignaturesDecodeErrorZ extends CommonBase {
+       private Result_AnnouncementSignaturesDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_AnnouncementSignaturesDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_AnnouncementSignaturesDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_AnnouncementSignaturesDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_AnnouncementSignaturesDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_AnnouncementSignaturesDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_AnnouncementSignaturesDecodeErrorZ_OK extends Result_AnnouncementSignaturesDecodeErrorZ {
+               public final AnnouncementSignatures res;
+               private Result_AnnouncementSignaturesDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: AnnouncementSignatures = new AnnouncementSignatures(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_AnnouncementSignaturesDecodeErrorZ_OK(AnnouncementSignatures res) {
+                       this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_AnnouncementSignaturesDecodeErrorZ_Err extends Result_AnnouncementSignaturesDecodeErrorZ {
+               public final DecodeError err;
+               private Result_AnnouncementSignaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_AnnouncementSignaturesDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_AnnouncementSignaturesDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_AnnouncementSignaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.ts b/ts/structs/Result_BuiltCommitmentTransactionDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..9e4fdaa
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_BuiltCommitmentTransactionDecodeErrorZ extends CommonBase {
+       private Result_BuiltCommitmentTransactionDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_BuiltCommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_BuiltCommitmentTransactionDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_BuiltCommitmentTransactionDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_BuiltCommitmentTransactionDecodeErrorZ_OK extends Result_BuiltCommitmentTransactionDecodeErrorZ {
+               public final BuiltCommitmentTransaction res;
+               private Result_BuiltCommitmentTransactionDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: BuiltCommitmentTransaction = new BuiltCommitmentTransaction(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_BuiltCommitmentTransactionDecodeErrorZ_OK(BuiltCommitmentTransaction res) {
+                       this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_BuiltCommitmentTransactionDecodeErrorZ_Err extends Result_BuiltCommitmentTransactionDecodeErrorZ {
+               public final DecodeError err;
+               private Result_BuiltCommitmentTransactionDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_BuiltCommitmentTransactionDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_BuiltCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_BuiltCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_CVec_CVec_u8ZZNoneZ.ts b/ts/structs/Result_CVec_CVec_u8ZZNoneZ.ts
new file mode 100644 (file)
index 0000000..5850251
--- /dev/null
@@ -0,0 +1,37 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_CVec_CVec_u8ZZNoneZ extends CommonBase {
+       private Result_CVec_CVec_u8ZZNoneZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_CVec_CVec_u8ZZNoneZ_free(ptr); } super.finalize();
+       }
+
+       static Result_CVec_CVec_u8ZZNoneZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_CVec_CVec_u8ZZNoneZ_result_ok(ptr)) {
+                       return new Result_CVec_CVec_u8ZZNoneZ_OK(null, ptr);
+               } else {
+                       return new Result_CVec_CVec_u8ZZNoneZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_CVec_CVec_u8ZZNoneZ_OK extends Result_CVec_CVec_u8ZZNoneZ {
+               public final Uint8Array[] res;
+               private Result_CVec_CVec_u8ZZNoneZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.res = bindings.LDKCResult_CVec_CVec_u8ZZNoneZ_get_ok(ptr);
+               }
+               public Result_CVec_CVec_u8ZZNoneZ_OK(Uint8Array[] res) {
+                       this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_ok(res));
+               }
+       }
+
+       public static final class Result_CVec_CVec_u8ZZNoneZ_Err extends Result_CVec_CVec_u8ZZNoneZ {
+               private Result_CVec_CVec_u8ZZNoneZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+               }
+               public Result_CVec_CVec_u8ZZNoneZ_Err() {
+                       this(null, bindings.CResult_CVec_CVec_u8ZZNoneZ_err());
+               }
+       }
+}
diff --git a/ts/structs/Result_ChanKeySignerDecodeErrorZ.ts b/ts/structs/Result_ChanKeySignerDecodeErrorZ.ts
deleted file mode 100644 (file)
index c8e6041..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-public class Result_ChanKeySignerDecodeErrorZ extends CommonBase {
-       private Result_ChanKeySignerDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_ChanKeySignerDecodeErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_ChanKeySignerDecodeErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_ChanKeySignerDecodeErrorZ_result_ok(ptr)) {
-                       return new Result_ChanKeySignerDecodeErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_ChanKeySignerDecodeErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_ChanKeySignerDecodeErrorZ_OK extends Result_ChanKeySignerDecodeErrorZ {
-               public final ChannelKeys res;
-               private Result_ChanKeySignerDecodeErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       number res = bindings.LDKCResult_ChanKeySignerDecodeErrorZ_get_ok(ptr);
-                       ChannelKeys ret_hu_conv = new ChannelKeys(null, res);
-                       ret_hu_conv.ptrs_to.add(this);
-                       this.res = ret_hu_conv;
-               }
-               public Result_ChanKeySignerDecodeErrorZ_OK(ChannelKeys res) {
-                       this(null, bindings.CResult_ChanKeySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr));
-                       this.ptrs_to.add(res);
-               }
-       }
-
-       public static final class Result_ChanKeySignerDecodeErrorZ_Err extends Result_ChanKeySignerDecodeErrorZ {
-               public final DecodeError err;
-               private Result_ChanKeySignerDecodeErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       number err = bindings.LDKCResult_ChanKeySignerDecodeErrorZ_get_err(ptr);
-                       const err_hu_conv: DecodeError = new DecodeError(null, err);
-                       err_hu_conv.ptrs_to.add(this);
-                       this.err = err_hu_conv;
-               }
-               public Result_ChanKeySignerDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_ChanKeySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
-       }
-}
diff --git a/ts/structs/Result_ChannelAnnouncementDecodeErrorZ.ts b/ts/structs/Result_ChannelAnnouncementDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..5145f35
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_ChannelAnnouncementDecodeErrorZ extends CommonBase {
+       private Result_ChannelAnnouncementDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelAnnouncementDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelAnnouncementDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelAnnouncementDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelAnnouncementDecodeErrorZ_OK extends Result_ChannelAnnouncementDecodeErrorZ {
+               public final ChannelAnnouncement res;
+               private Result_ChannelAnnouncementDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_ChannelAnnouncementDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelAnnouncementDecodeErrorZ_OK(ChannelAnnouncement res) {
+                       this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelAnnouncementDecodeErrorZ_Err extends Result_ChannelAnnouncementDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelAnnouncementDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_ChannelAnnouncementDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelAnnouncementDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_ChannelConfigDecodeErrorZ.ts b/ts/structs/Result_ChannelConfigDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..ea264bb
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_ChannelConfigDecodeErrorZ extends CommonBase {
+       private Result_ChannelConfigDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelConfigDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelConfigDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelConfigDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelConfigDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelConfigDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelConfigDecodeErrorZ_OK extends Result_ChannelConfigDecodeErrorZ {
+               public final ChannelConfig res;
+               private Result_ChannelConfigDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_ChannelConfigDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: ChannelConfig = new ChannelConfig(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelConfigDecodeErrorZ_OK(ChannelConfig res) {
+                       this(null, bindings.CResult_ChannelConfigDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelConfigDecodeErrorZ_Err extends Result_ChannelConfigDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelConfigDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_ChannelConfigDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelConfigDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelConfigDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_ChannelFeaturesDecodeErrorZ.ts b/ts/structs/Result_ChannelFeaturesDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..931540c
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_ChannelFeaturesDecodeErrorZ extends CommonBase {
+       private Result_ChannelFeaturesDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelFeaturesDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelFeaturesDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelFeaturesDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelFeaturesDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelFeaturesDecodeErrorZ_OK extends Result_ChannelFeaturesDecodeErrorZ {
+               public final ChannelFeatures res;
+               private Result_ChannelFeaturesDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_ChannelFeaturesDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: ChannelFeatures = new ChannelFeatures(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelFeaturesDecodeErrorZ_OK(ChannelFeatures res) {
+                       this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelFeaturesDecodeErrorZ_Err extends Result_ChannelFeaturesDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_ChannelFeaturesDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelFeaturesDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_ChannelInfoDecodeErrorZ.ts b/ts/structs/Result_ChannelInfoDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..3650d84
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_ChannelInfoDecodeErrorZ extends CommonBase {
+       private Result_ChannelInfoDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelInfoDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelInfoDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelInfoDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelInfoDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelInfoDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelInfoDecodeErrorZ_OK extends Result_ChannelInfoDecodeErrorZ {
+               public final ChannelInfo res;
+               private Result_ChannelInfoDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_ChannelInfoDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: ChannelInfo = new ChannelInfo(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelInfoDecodeErrorZ_OK(ChannelInfo res) {
+                       this(null, bindings.CResult_ChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelInfoDecodeErrorZ_Err extends Result_ChannelInfoDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelInfoDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_ChannelInfoDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelInfoDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_ChannelPublicKeysDecodeErrorZ.ts b/ts/structs/Result_ChannelPublicKeysDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..c0febea
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_ChannelPublicKeysDecodeErrorZ extends CommonBase {
+       private Result_ChannelPublicKeysDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelPublicKeysDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelPublicKeysDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelPublicKeysDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelPublicKeysDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelPublicKeysDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelPublicKeysDecodeErrorZ_OK extends Result_ChannelPublicKeysDecodeErrorZ {
+               public final ChannelPublicKeys res;
+               private Result_ChannelPublicKeysDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_ChannelPublicKeysDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelPublicKeysDecodeErrorZ_OK(ChannelPublicKeys res) {
+                       this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelPublicKeysDecodeErrorZ_Err extends Result_ChannelPublicKeysDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelPublicKeysDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_ChannelPublicKeysDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelPublicKeysDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelPublicKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_ChannelTransactionParametersDecodeErrorZ.ts b/ts/structs/Result_ChannelTransactionParametersDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..2353ce9
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_ChannelTransactionParametersDecodeErrorZ extends CommonBase {
+       private Result_ChannelTransactionParametersDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelTransactionParametersDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelTransactionParametersDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelTransactionParametersDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelTransactionParametersDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelTransactionParametersDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelTransactionParametersDecodeErrorZ_OK extends Result_ChannelTransactionParametersDecodeErrorZ {
+               public final ChannelTransactionParameters res;
+               private Result_ChannelTransactionParametersDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelTransactionParametersDecodeErrorZ_OK(ChannelTransactionParameters res) {
+                       this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelTransactionParametersDecodeErrorZ_Err extends Result_ChannelTransactionParametersDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelTransactionParametersDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_ChannelTransactionParametersDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_ChannelUpdateDecodeErrorZ.ts b/ts/structs/Result_ChannelUpdateDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..f3f85e3
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_ChannelUpdateDecodeErrorZ extends CommonBase {
+       private Result_ChannelUpdateDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ChannelUpdateDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ChannelUpdateDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ChannelUpdateDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ChannelUpdateDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ChannelUpdateDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ChannelUpdateDecodeErrorZ_OK extends Result_ChannelUpdateDecodeErrorZ {
+               public final ChannelUpdate res;
+               private Result_ChannelUpdateDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_ChannelUpdateDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: ChannelUpdate = new ChannelUpdate(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ChannelUpdateDecodeErrorZ_OK(ChannelUpdate res) {
+                       this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ChannelUpdateDecodeErrorZ_Err extends Result_ChannelUpdateDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ChannelUpdateDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_ChannelUpdateDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ChannelUpdateDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ChannelUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_ClosingSignedDecodeErrorZ.ts b/ts/structs/Result_ClosingSignedDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..7163fff
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_ClosingSignedDecodeErrorZ extends CommonBase {
+       private Result_ClosingSignedDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ClosingSignedDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ClosingSignedDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ClosingSignedDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ClosingSignedDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ClosingSignedDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ClosingSignedDecodeErrorZ_OK extends Result_ClosingSignedDecodeErrorZ {
+               public final ClosingSigned res;
+               private Result_ClosingSignedDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_ClosingSignedDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: ClosingSigned = new ClosingSigned(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ClosingSignedDecodeErrorZ_OK(ClosingSigned res) {
+                       this(null, bindings.CResult_ClosingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ClosingSignedDecodeErrorZ_Err extends Result_ClosingSignedDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ClosingSignedDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_ClosingSignedDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ClosingSignedDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ClosingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_CommitmentSignedDecodeErrorZ.ts b/ts/structs/Result_CommitmentSignedDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..3168c27
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_CommitmentSignedDecodeErrorZ extends CommonBase {
+       private Result_CommitmentSignedDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_CommitmentSignedDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_CommitmentSignedDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_CommitmentSignedDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_CommitmentSignedDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_CommitmentSignedDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_CommitmentSignedDecodeErrorZ_OK extends Result_CommitmentSignedDecodeErrorZ {
+               public final CommitmentSigned res;
+               private Result_CommitmentSignedDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_CommitmentSignedDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: CommitmentSigned = new CommitmentSigned(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_CommitmentSignedDecodeErrorZ_OK(CommitmentSigned res) {
+                       this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_CommitmentSignedDecodeErrorZ_Err extends Result_CommitmentSignedDecodeErrorZ {
+               public final DecodeError err;
+               private Result_CommitmentSignedDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_CommitmentSignedDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_CommitmentSignedDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_CommitmentSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_CommitmentTransactionDecodeErrorZ.ts b/ts/structs/Result_CommitmentTransactionDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..a555e9e
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_CommitmentTransactionDecodeErrorZ extends CommonBase {
+       private Result_CommitmentTransactionDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_CommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_CommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_CommitmentTransactionDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_CommitmentTransactionDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_CommitmentTransactionDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_CommitmentTransactionDecodeErrorZ_OK extends Result_CommitmentTransactionDecodeErrorZ {
+               public final CommitmentTransaction res;
+               private Result_CommitmentTransactionDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_CommitmentTransactionDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: CommitmentTransaction = new CommitmentTransaction(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_CommitmentTransactionDecodeErrorZ_OK(CommitmentTransaction res) {
+                       this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_CommitmentTransactionDecodeErrorZ_Err extends Result_CommitmentTransactionDecodeErrorZ {
+               public final DecodeError err;
+               private Result_CommitmentTransactionDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_CommitmentTransactionDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_CommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_CommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.ts b/ts/structs/Result_CounterpartyChannelTransactionParametersDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..68e67ff
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_CounterpartyChannelTransactionParametersDecodeErrorZ extends CommonBase {
+       private Result_CounterpartyChannelTransactionParametersDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_CounterpartyChannelTransactionParametersDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK extends Result_CounterpartyChannelTransactionParametersDecodeErrorZ {
+               public final CounterpartyChannelTransactionParameters res;
+               private Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: CounterpartyChannelTransactionParameters = new CounterpartyChannelTransactionParameters(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_OK(CounterpartyChannelTransactionParameters res) {
+                       this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err extends Result_CounterpartyChannelTransactionParametersDecodeErrorZ {
+               public final DecodeError err;
+               private Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_CounterpartyChannelTransactionParametersDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_CounterpartyChannelTransactionParametersDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_CounterpartyChannelTransactionParametersDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_DirectionalChannelInfoDecodeErrorZ.ts b/ts/structs/Result_DirectionalChannelInfoDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..972fc4b
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_DirectionalChannelInfoDecodeErrorZ extends CommonBase {
+       private Result_DirectionalChannelInfoDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_DirectionalChannelInfoDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_DirectionalChannelInfoDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_DirectionalChannelInfoDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_DirectionalChannelInfoDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_DirectionalChannelInfoDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_DirectionalChannelInfoDecodeErrorZ_OK extends Result_DirectionalChannelInfoDecodeErrorZ {
+               public final DirectionalChannelInfo res;
+               private Result_DirectionalChannelInfoDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: DirectionalChannelInfo = new DirectionalChannelInfo(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_DirectionalChannelInfoDecodeErrorZ_OK(DirectionalChannelInfo res) {
+                       this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_DirectionalChannelInfoDecodeErrorZ_Err extends Result_DirectionalChannelInfoDecodeErrorZ {
+               public final DecodeError err;
+               private Result_DirectionalChannelInfoDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_DirectionalChannelInfoDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_DirectionalChannelInfoDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_DirectionalChannelInfoDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_FundingCreatedDecodeErrorZ.ts b/ts/structs/Result_FundingCreatedDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..6105012
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_FundingCreatedDecodeErrorZ extends CommonBase {
+       private Result_FundingCreatedDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_FundingCreatedDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_FundingCreatedDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_FundingCreatedDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_FundingCreatedDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_FundingCreatedDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_FundingCreatedDecodeErrorZ_OK extends Result_FundingCreatedDecodeErrorZ {
+               public final FundingCreated res;
+               private Result_FundingCreatedDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_FundingCreatedDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: FundingCreated = new FundingCreated(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_FundingCreatedDecodeErrorZ_OK(FundingCreated res) {
+                       this(null, bindings.CResult_FundingCreatedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_FundingCreatedDecodeErrorZ_Err extends Result_FundingCreatedDecodeErrorZ {
+               public final DecodeError err;
+               private Result_FundingCreatedDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_FundingCreatedDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_FundingCreatedDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_FundingCreatedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_FundingLockedDecodeErrorZ.ts b/ts/structs/Result_FundingLockedDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..c5bd201
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_FundingLockedDecodeErrorZ extends CommonBase {
+       private Result_FundingLockedDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_FundingLockedDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_FundingLockedDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_FundingLockedDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_FundingLockedDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_FundingLockedDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_FundingLockedDecodeErrorZ_OK extends Result_FundingLockedDecodeErrorZ {
+               public final FundingLocked res;
+               private Result_FundingLockedDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_FundingLockedDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: FundingLocked = new FundingLocked(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_FundingLockedDecodeErrorZ_OK(FundingLocked res) {
+                       this(null, bindings.CResult_FundingLockedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_FundingLockedDecodeErrorZ_Err extends Result_FundingLockedDecodeErrorZ {
+               public final DecodeError err;
+               private Result_FundingLockedDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_FundingLockedDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_FundingLockedDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_FundingLockedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_FundingSignedDecodeErrorZ.ts b/ts/structs/Result_FundingSignedDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..37fbef2
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_FundingSignedDecodeErrorZ extends CommonBase {
+       private Result_FundingSignedDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_FundingSignedDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_FundingSignedDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_FundingSignedDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_FundingSignedDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_FundingSignedDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_FundingSignedDecodeErrorZ_OK extends Result_FundingSignedDecodeErrorZ {
+               public final FundingSigned res;
+               private Result_FundingSignedDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_FundingSignedDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: FundingSigned = new FundingSigned(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_FundingSignedDecodeErrorZ_OK(FundingSigned res) {
+                       this(null, bindings.CResult_FundingSignedDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_FundingSignedDecodeErrorZ_Err extends Result_FundingSignedDecodeErrorZ {
+               public final DecodeError err;
+               private Result_FundingSignedDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_FundingSignedDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_FundingSignedDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_FundingSignedDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.ts b/ts/structs/Result_HTLCOutputInCommitmentDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..634405b
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_HTLCOutputInCommitmentDecodeErrorZ extends CommonBase {
+       private Result_HTLCOutputInCommitmentDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_HTLCOutputInCommitmentDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_HTLCOutputInCommitmentDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_HTLCOutputInCommitmentDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_HTLCOutputInCommitmentDecodeErrorZ_OK extends Result_HTLCOutputInCommitmentDecodeErrorZ {
+               public final HTLCOutputInCommitment res;
+               private Result_HTLCOutputInCommitmentDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_HTLCOutputInCommitmentDecodeErrorZ_OK(HTLCOutputInCommitment res) {
+                       this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_HTLCOutputInCommitmentDecodeErrorZ_Err extends Result_HTLCOutputInCommitmentDecodeErrorZ {
+               public final DecodeError err;
+               private Result_HTLCOutputInCommitmentDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_HTLCOutputInCommitmentDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_HTLCOutputInCommitmentDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_HTLCOutputInCommitmentDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_HTLCUpdateDecodeErrorZ.ts b/ts/structs/Result_HTLCUpdateDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..3e6815f
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_HTLCUpdateDecodeErrorZ extends CommonBase {
+       private Result_HTLCUpdateDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_HTLCUpdateDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_HTLCUpdateDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_HTLCUpdateDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_HTLCUpdateDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_HTLCUpdateDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_HTLCUpdateDecodeErrorZ_OK extends Result_HTLCUpdateDecodeErrorZ {
+               public final HTLCUpdate res;
+               private Result_HTLCUpdateDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_HTLCUpdateDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: HTLCUpdate = new HTLCUpdate(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_HTLCUpdateDecodeErrorZ_OK(HTLCUpdate res) {
+                       this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_HTLCUpdateDecodeErrorZ_Err extends Result_HTLCUpdateDecodeErrorZ {
+               public final DecodeError err;
+               private Result_HTLCUpdateDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_HTLCUpdateDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_HTLCUpdateDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_HTLCUpdateDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_HolderCommitmentTransactionDecodeErrorZ.ts b/ts/structs/Result_HolderCommitmentTransactionDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..613fcb9
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_HolderCommitmentTransactionDecodeErrorZ extends CommonBase {
+       private Result_HolderCommitmentTransactionDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_HolderCommitmentTransactionDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_HolderCommitmentTransactionDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_HolderCommitmentTransactionDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_HolderCommitmentTransactionDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_HolderCommitmentTransactionDecodeErrorZ_OK extends Result_HolderCommitmentTransactionDecodeErrorZ {
+               public final HolderCommitmentTransaction res;
+               private Result_HolderCommitmentTransactionDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_HolderCommitmentTransactionDecodeErrorZ_OK(HolderCommitmentTransaction res) {
+                       this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_HolderCommitmentTransactionDecodeErrorZ_Err extends Result_HolderCommitmentTransactionDecodeErrorZ {
+               public final DecodeError err;
+               private Result_HolderCommitmentTransactionDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_HolderCommitmentTransactionDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_HolderCommitmentTransactionDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_HolderCommitmentTransactionDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_InMemoryChannelKeysDecodeErrorZ.ts b/ts/structs/Result_InMemoryChannelKeysDecodeErrorZ.ts
deleted file mode 100644 (file)
index 0d03fd6..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-public class Result_InMemoryChannelKeysDecodeErrorZ extends CommonBase {
-       private Result_InMemoryChannelKeysDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_InMemoryChannelKeysDecodeErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_InMemoryChannelKeysDecodeErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_InMemoryChannelKeysDecodeErrorZ_result_ok(ptr)) {
-                       return new Result_InMemoryChannelKeysDecodeErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_InMemoryChannelKeysDecodeErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_InMemoryChannelKeysDecodeErrorZ_OK extends Result_InMemoryChannelKeysDecodeErrorZ {
-               public final InMemoryChannelKeys res;
-               private Result_InMemoryChannelKeysDecodeErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       number res = bindings.LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_ok(ptr);
-                       const res_hu_conv: InMemoryChannelKeys = new InMemoryChannelKeys(null, res);
-                       res_hu_conv.ptrs_to.add(this);
-                       this.res = res_hu_conv;
-               }
-               public Result_InMemoryChannelKeysDecodeErrorZ_OK(InMemoryChannelKeys res) {
-                       this(null, bindings.CResult_InMemoryChannelKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
-       }
-
-       public static final class Result_InMemoryChannelKeysDecodeErrorZ_Err extends Result_InMemoryChannelKeysDecodeErrorZ {
-               public final DecodeError err;
-               private Result_InMemoryChannelKeysDecodeErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       number err = bindings.LDKCResult_InMemoryChannelKeysDecodeErrorZ_get_err(ptr);
-                       const err_hu_conv: DecodeError = new DecodeError(null, err);
-                       err_hu_conv.ptrs_to.add(this);
-                       this.err = err_hu_conv;
-               }
-               public Result_InMemoryChannelKeysDecodeErrorZ_Err(DecodeError err) {
-                       this(null, bindings.CResult_InMemoryChannelKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
-               }
-       }
-}
diff --git a/ts/structs/Result_InMemorySignerDecodeErrorZ.ts b/ts/structs/Result_InMemorySignerDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..89175a7
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_InMemorySignerDecodeErrorZ extends CommonBase {
+       private Result_InMemorySignerDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_InMemorySignerDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_InMemorySignerDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_InMemorySignerDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_InMemorySignerDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_InMemorySignerDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_InMemorySignerDecodeErrorZ_OK extends Result_InMemorySignerDecodeErrorZ {
+               public final InMemorySigner res;
+               private Result_InMemorySignerDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_InMemorySignerDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: InMemorySigner = new InMemorySigner(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_InMemorySignerDecodeErrorZ_OK(InMemorySigner res) {
+                       this(null, bindings.CResult_InMemorySignerDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_InMemorySignerDecodeErrorZ_Err extends Result_InMemorySignerDecodeErrorZ {
+               public final DecodeError err;
+               private Result_InMemorySignerDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_InMemorySignerDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_InMemorySignerDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_InMemorySignerDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_InitFeaturesDecodeErrorZ.ts b/ts/structs/Result_InitFeaturesDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..2d95979
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_InitFeaturesDecodeErrorZ extends CommonBase {
+       private Result_InitFeaturesDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_InitFeaturesDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_InitFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_InitFeaturesDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_InitFeaturesDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_InitFeaturesDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_InitFeaturesDecodeErrorZ_OK extends Result_InitFeaturesDecodeErrorZ {
+               public final InitFeatures res;
+               private Result_InitFeaturesDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_InitFeaturesDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: InitFeatures = new InitFeatures(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_InitFeaturesDecodeErrorZ_OK(InitFeatures res) {
+                       this(null, bindings.CResult_InitFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_InitFeaturesDecodeErrorZ_Err extends Result_InitFeaturesDecodeErrorZ {
+               public final DecodeError err;
+               private Result_InitFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_InitFeaturesDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_InitFeaturesDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_InitFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
index 38c3c2989d9cf7535a1612cd7e1dd2c4bfba3849..78921d4e155580809c06b25e44c8970bc00d1f5d 100644 (file)
@@ -27,14 +27,6 @@ public class Result_NetworkGraphDecodeErrorZ extends CommonBase {
                public Result_NetworkGraphDecodeErrorZ_OK(NetworkGraph res) {
                        this(null, bindings.CResult_NetworkGraphDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
                        this.ptrs_to.add(res);
-                       // 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, res is reset to null and is now a dummy object.
-                       res.ptr = 0;
                }
        }
 
diff --git a/ts/structs/Result_NodeAnnouncementDecodeErrorZ.ts b/ts/structs/Result_NodeAnnouncementDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..b382ff5
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_NodeAnnouncementDecodeErrorZ extends CommonBase {
+       private Result_NodeAnnouncementDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_NodeAnnouncementDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_NodeAnnouncementDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_NodeAnnouncementDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_NodeAnnouncementDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_NodeAnnouncementDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_NodeAnnouncementDecodeErrorZ_OK extends Result_NodeAnnouncementDecodeErrorZ {
+               public final NodeAnnouncement res;
+               private Result_NodeAnnouncementDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_NodeAnnouncementDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_NodeAnnouncementDecodeErrorZ_OK(NodeAnnouncement res) {
+                       this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_NodeAnnouncementDecodeErrorZ_Err extends Result_NodeAnnouncementDecodeErrorZ {
+               public final DecodeError err;
+               private Result_NodeAnnouncementDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_NodeAnnouncementDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_NodeAnnouncementDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_NodeAnnouncementDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_NodeFeaturesDecodeErrorZ.ts b/ts/structs/Result_NodeFeaturesDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..cd3d97d
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_NodeFeaturesDecodeErrorZ extends CommonBase {
+       private Result_NodeFeaturesDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_NodeFeaturesDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_NodeFeaturesDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_NodeFeaturesDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_NodeFeaturesDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_NodeFeaturesDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_NodeFeaturesDecodeErrorZ_OK extends Result_NodeFeaturesDecodeErrorZ {
+               public final NodeFeatures res;
+               private Result_NodeFeaturesDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_NodeFeaturesDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: NodeFeatures = new NodeFeatures(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_NodeFeaturesDecodeErrorZ_OK(NodeFeatures res) {
+                       this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_NodeFeaturesDecodeErrorZ_Err extends Result_NodeFeaturesDecodeErrorZ {
+               public final DecodeError err;
+               private Result_NodeFeaturesDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_NodeFeaturesDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_NodeFeaturesDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_NodeFeaturesDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
index e3b4f9fbcdffc44f28526e7e290a101384ea7914..66ac0bed06207ae7694eca9d5ffe3358e458cb9e 100644 (file)
@@ -29,13 +29,12 @@ public class Result_NonePaymentSendFailureZ extends CommonBase {
                private Result_NonePaymentSendFailureZ_Err(Object _dummy, long ptr) {
                        super(_dummy, ptr);
                        number err = bindings.LDKCResult_NonePaymentSendFailureZ_get_err(ptr);
-                       const err_hu_conv: PaymentSendFailure = new PaymentSendFailure(null, err);
+                       PaymentSendFailure err_hu_conv = PaymentSendFailure.constr_from_ptr(err);
                        err_hu_conv.ptrs_to.add(this);
                        this.err = err_hu_conv;
                }
                public Result_NonePaymentSendFailureZ_Err(PaymentSendFailure err) {
-                       this(null, bindings.CResult_NonePaymentSendFailureZ_err(err == null ? 0 : err.ptr & ~1));
-                       this.ptrs_to.add(err);
+                       this(null, bindings.CResult_NonePaymentSendFailureZ_err(err.ptr));
                }
        }
 }
diff --git a/ts/structs/Result_OpenChannelDecodeErrorZ.ts b/ts/structs/Result_OpenChannelDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..0b9e5bf
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_OpenChannelDecodeErrorZ extends CommonBase {
+       private Result_OpenChannelDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_OpenChannelDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_OpenChannelDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_OpenChannelDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_OpenChannelDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_OpenChannelDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_OpenChannelDecodeErrorZ_OK extends Result_OpenChannelDecodeErrorZ {
+               public final OpenChannel res;
+               private Result_OpenChannelDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_OpenChannelDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: OpenChannel = new OpenChannel(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_OpenChannelDecodeErrorZ_OK(OpenChannel res) {
+                       this(null, bindings.CResult_OpenChannelDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_OpenChannelDecodeErrorZ_Err extends Result_OpenChannelDecodeErrorZ {
+               public final DecodeError err;
+               private Result_OpenChannelDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_OpenChannelDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_OpenChannelDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_OpenChannelDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_OutPointDecodeErrorZ.ts b/ts/structs/Result_OutPointDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..7d46bc2
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_OutPointDecodeErrorZ extends CommonBase {
+       private Result_OutPointDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_OutPointDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_OutPointDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_OutPointDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_OutPointDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_OutPointDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_OutPointDecodeErrorZ_OK extends Result_OutPointDecodeErrorZ {
+               public final OutPoint res;
+               private Result_OutPointDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_OutPointDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: OutPoint = new OutPoint(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_OutPointDecodeErrorZ_OK(OutPoint res) {
+                       this(null, bindings.CResult_OutPointDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_OutPointDecodeErrorZ_Err extends Result_OutPointDecodeErrorZ {
+               public final DecodeError err;
+               private Result_OutPointDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_OutPointDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_OutPointDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_OutPointDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_PublicKeyErrorZ.ts b/ts/structs/Result_PublicKeyErrorZ.ts
new file mode 100644 (file)
index 0000000..2a790f1
--- /dev/null
@@ -0,0 +1,39 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_PublicKeyErrorZ extends CommonBase {
+       private Result_PublicKeyErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_PublicKeyErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_PublicKeyErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_PublicKeyErrorZ_result_ok(ptr)) {
+                       return new Result_PublicKeyErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_PublicKeyErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_PublicKeyErrorZ_OK extends Result_PublicKeyErrorZ {
+               public final Uint8Array res;
+               private Result_PublicKeyErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.res = bindings.LDKCResult_PublicKeyErrorZ_get_ok(ptr);
+               }
+               public Result_PublicKeyErrorZ_OK(Uint8Array res) {
+                       this(null, bindings.CResult_PublicKeyErrorZ_ok(res));
+               }
+       }
+
+       public static final class Result_PublicKeyErrorZ_Err extends Result_PublicKeyErrorZ {
+               public final LDKSecp256k1Error err;
+               private Result_PublicKeyErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.LDKCResult_PublicKeyErrorZ_get_err(ptr);
+               }
+               public Result_PublicKeyErrorZ_Err(LDKSecp256k1Error err) {
+                       this(null, bindings.CResult_PublicKeyErrorZ_err(err));
+               }
+       }
+}
diff --git a/ts/structs/Result_PublicKeySecpErrorZ.ts b/ts/structs/Result_PublicKeySecpErrorZ.ts
deleted file mode 100644 (file)
index bf427c7..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-public class Result_PublicKeySecpErrorZ extends CommonBase {
-       private Result_PublicKeySecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_PublicKeySecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_PublicKeySecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_PublicKeySecpErrorZ_result_ok(ptr)) {
-                       return new Result_PublicKeySecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_PublicKeySecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_PublicKeySecpErrorZ_OK extends Result_PublicKeySecpErrorZ {
-               public final Uint8Array res;
-               private Result_PublicKeySecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.res = bindings.LDKCResult_PublicKeySecpErrorZ_get_ok(ptr);
-               }
-               public Result_PublicKeySecpErrorZ_OK(Uint8Array res) {
-                       this(null, bindings.CResult_PublicKeySecpErrorZ_ok(res));
-               }
-       }
-
-       public static final class Result_PublicKeySecpErrorZ_Err extends Result_PublicKeySecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_PublicKeySecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_PublicKeySecpErrorZ_get_err(ptr);
-               }
-               public Result_PublicKeySecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_PublicKeySecpErrorZ_err(err));
-               }
-       }
-}
diff --git a/ts/structs/Result_RevokeAndACKDecodeErrorZ.ts b/ts/structs/Result_RevokeAndACKDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..30426fd
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_RevokeAndACKDecodeErrorZ extends CommonBase {
+       private Result_RevokeAndACKDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_RevokeAndACKDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_RevokeAndACKDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_RevokeAndACKDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_RevokeAndACKDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_RevokeAndACKDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_RevokeAndACKDecodeErrorZ_OK extends Result_RevokeAndACKDecodeErrorZ {
+               public final RevokeAndACK res;
+               private Result_RevokeAndACKDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_RevokeAndACKDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: RevokeAndACK = new RevokeAndACK(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_RevokeAndACKDecodeErrorZ_OK(RevokeAndACK res) {
+                       this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_RevokeAndACKDecodeErrorZ_Err extends Result_RevokeAndACKDecodeErrorZ {
+               public final DecodeError err;
+               private Result_RevokeAndACKDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_RevokeAndACKDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_RevokeAndACKDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_RevokeAndACKDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_SecretKeyErrorZ.ts b/ts/structs/Result_SecretKeyErrorZ.ts
new file mode 100644 (file)
index 0000000..727c4b2
--- /dev/null
@@ -0,0 +1,39 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_SecretKeyErrorZ extends CommonBase {
+       private Result_SecretKeyErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_SecretKeyErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_SecretKeyErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_SecretKeyErrorZ_result_ok(ptr)) {
+                       return new Result_SecretKeyErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_SecretKeyErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_SecretKeyErrorZ_OK extends Result_SecretKeyErrorZ {
+               public final Uint8Array res;
+               private Result_SecretKeyErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.res = bindings.LDKCResult_SecretKeyErrorZ_get_ok(ptr);
+               }
+               public Result_SecretKeyErrorZ_OK(Uint8Array res) {
+                       this(null, bindings.CResult_SecretKeyErrorZ_ok(res));
+               }
+       }
+
+       public static final class Result_SecretKeyErrorZ_Err extends Result_SecretKeyErrorZ {
+               public final LDKSecp256k1Error err;
+               private Result_SecretKeyErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.LDKCResult_SecretKeyErrorZ_get_err(ptr);
+               }
+               public Result_SecretKeyErrorZ_Err(LDKSecp256k1Error err) {
+                       this(null, bindings.CResult_SecretKeyErrorZ_err(err));
+               }
+       }
+}
diff --git a/ts/structs/Result_SecretKeySecpErrorZ.ts b/ts/structs/Result_SecretKeySecpErrorZ.ts
deleted file mode 100644 (file)
index 5ebf99c..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-public class Result_SecretKeySecpErrorZ extends CommonBase {
-       private Result_SecretKeySecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_SecretKeySecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_SecretKeySecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_SecretKeySecpErrorZ_result_ok(ptr)) {
-                       return new Result_SecretKeySecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_SecretKeySecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_SecretKeySecpErrorZ_OK extends Result_SecretKeySecpErrorZ {
-               public final Uint8Array res;
-               private Result_SecretKeySecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.res = bindings.LDKCResult_SecretKeySecpErrorZ_get_ok(ptr);
-               }
-               public Result_SecretKeySecpErrorZ_OK(Uint8Array res) {
-                       this(null, bindings.CResult_SecretKeySecpErrorZ_ok(res));
-               }
-       }
-
-       public static final class Result_SecretKeySecpErrorZ_Err extends Result_SecretKeySecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_SecretKeySecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_SecretKeySecpErrorZ_get_err(ptr);
-               }
-               public Result_SecretKeySecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_SecretKeySecpErrorZ_err(err));
-               }
-       }
-}
diff --git a/ts/structs/Result_ShutdownDecodeErrorZ.ts b/ts/structs/Result_ShutdownDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..6b53c42
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_ShutdownDecodeErrorZ extends CommonBase {
+       private Result_ShutdownDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_ShutdownDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_ShutdownDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_ShutdownDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_ShutdownDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_ShutdownDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_ShutdownDecodeErrorZ_OK extends Result_ShutdownDecodeErrorZ {
+               public final Shutdown res;
+               private Result_ShutdownDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_ShutdownDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: Shutdown = new Shutdown(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_ShutdownDecodeErrorZ_OK(Shutdown res) {
+                       this(null, bindings.CResult_ShutdownDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_ShutdownDecodeErrorZ_Err extends Result_ShutdownDecodeErrorZ {
+               public final DecodeError err;
+               private Result_ShutdownDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_ShutdownDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_ShutdownDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_ShutdownDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_SignDecodeErrorZ.ts b/ts/structs/Result_SignDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..005c0a0
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_SignDecodeErrorZ extends CommonBase {
+       private Result_SignDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_SignDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_SignDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_SignDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_SignDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_SignDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_SignDecodeErrorZ_OK extends Result_SignDecodeErrorZ {
+               public final Sign res;
+               private Result_SignDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_SignDecodeErrorZ_get_ok(ptr);
+                       Sign ret_hu_conv = new Sign(null, res);
+                       ret_hu_conv.ptrs_to.add(this);
+                       this.res = ret_hu_conv;
+               }
+               public Result_SignDecodeErrorZ_OK(Sign res) {
+                       this(null, bindings.CResult_SignDecodeErrorZ_ok(res == null ? 0 : res.ptr));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_SignDecodeErrorZ_Err extends Result_SignDecodeErrorZ {
+               public final DecodeError err;
+               private Result_SignDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_SignDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_SignDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_SignDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_TransactionNoneZ.ts b/ts/structs/Result_TransactionNoneZ.ts
new file mode 100644 (file)
index 0000000..b6abe50
--- /dev/null
@@ -0,0 +1,37 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_TransactionNoneZ extends CommonBase {
+       private Result_TransactionNoneZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_TransactionNoneZ_free(ptr); } super.finalize();
+       }
+
+       static Result_TransactionNoneZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_TransactionNoneZ_result_ok(ptr)) {
+                       return new Result_TransactionNoneZ_OK(null, ptr);
+               } else {
+                       return new Result_TransactionNoneZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_TransactionNoneZ_OK extends Result_TransactionNoneZ {
+               public final Uint8Array res;
+               private Result_TransactionNoneZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.res = bindings.LDKCResult_TransactionNoneZ_get_ok(ptr);
+               }
+               public Result_TransactionNoneZ_OK(Uint8Array res) {
+                       this(null, bindings.CResult_TransactionNoneZ_ok(res));
+               }
+       }
+
+       public static final class Result_TransactionNoneZ_Err extends Result_TransactionNoneZ {
+               private Result_TransactionNoneZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+               }
+               public Result_TransactionNoneZ_Err() {
+                       this(null, bindings.CResult_TransactionNoneZ_err());
+               }
+       }
+}
diff --git a/ts/structs/Result_TxCreationKeysDecodeErrorZ.ts b/ts/structs/Result_TxCreationKeysDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..d58dcaf
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_TxCreationKeysDecodeErrorZ extends CommonBase {
+       private Result_TxCreationKeysDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_TxCreationKeysDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_TxCreationKeysDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_TxCreationKeysDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_TxCreationKeysDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_TxCreationKeysDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_TxCreationKeysDecodeErrorZ_OK extends Result_TxCreationKeysDecodeErrorZ {
+               public final TxCreationKeys res;
+               private Result_TxCreationKeysDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_TxCreationKeysDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: TxCreationKeys = new TxCreationKeys(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_TxCreationKeysDecodeErrorZ_OK(TxCreationKeys res) {
+                       this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_TxCreationKeysDecodeErrorZ_Err extends Result_TxCreationKeysDecodeErrorZ {
+               public final DecodeError err;
+               private Result_TxCreationKeysDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_TxCreationKeysDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_TxCreationKeysDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_TxCreationKeysDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_TxCreationKeysErrorZ.ts b/ts/structs/Result_TxCreationKeysErrorZ.ts
new file mode 100644 (file)
index 0000000..964be88
--- /dev/null
@@ -0,0 +1,43 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_TxCreationKeysErrorZ extends CommonBase {
+       private Result_TxCreationKeysErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_TxCreationKeysErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_TxCreationKeysErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_TxCreationKeysErrorZ_result_ok(ptr)) {
+                       return new Result_TxCreationKeysErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_TxCreationKeysErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_TxCreationKeysErrorZ_OK extends Result_TxCreationKeysErrorZ {
+               public final TxCreationKeys res;
+               private Result_TxCreationKeysErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_TxCreationKeysErrorZ_get_ok(ptr);
+                       const res_hu_conv: TxCreationKeys = new TxCreationKeys(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_TxCreationKeysErrorZ_OK(TxCreationKeys res) {
+                       this(null, bindings.CResult_TxCreationKeysErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_TxCreationKeysErrorZ_Err extends Result_TxCreationKeysErrorZ {
+               public final LDKSecp256k1Error err;
+               private Result_TxCreationKeysErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       this.err = bindings.LDKCResult_TxCreationKeysErrorZ_get_err(ptr);
+               }
+               public Result_TxCreationKeysErrorZ_Err(LDKSecp256k1Error err) {
+                       this(null, bindings.CResult_TxCreationKeysErrorZ_err(err));
+               }
+       }
+}
diff --git a/ts/structs/Result_TxCreationKeysSecpErrorZ.ts b/ts/structs/Result_TxCreationKeysSecpErrorZ.ts
deleted file mode 100644 (file)
index fa385e1..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-
-import CommonBase from './CommonBase';
-import * as bindings from '../bindings' // TODO: figure out location
-
-public class Result_TxCreationKeysSecpErrorZ extends CommonBase {
-       private Result_TxCreationKeysSecpErrorZ(Object _dummy, long ptr) { super(ptr); }
-       protected void finalize() throws Throwable {
-               if (ptr != 0) { bindings.CResult_TxCreationKeysSecpErrorZ_free(ptr); } super.finalize();
-       }
-
-       static Result_TxCreationKeysSecpErrorZ constr_from_ptr(long ptr) {
-               if (bindings.LDKCResult_TxCreationKeysSecpErrorZ_result_ok(ptr)) {
-                       return new Result_TxCreationKeysSecpErrorZ_OK(null, ptr);
-               } else {
-                       return new Result_TxCreationKeysSecpErrorZ_Err(null, ptr);
-               }
-       }
-       public static final class Result_TxCreationKeysSecpErrorZ_OK extends Result_TxCreationKeysSecpErrorZ {
-               public final TxCreationKeys res;
-               private Result_TxCreationKeysSecpErrorZ_OK(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       number res = bindings.LDKCResult_TxCreationKeysSecpErrorZ_get_ok(ptr);
-                       const res_hu_conv: TxCreationKeys = new TxCreationKeys(null, res);
-                       res_hu_conv.ptrs_to.add(this);
-                       this.res = res_hu_conv;
-               }
-               public Result_TxCreationKeysSecpErrorZ_OK(TxCreationKeys res) {
-                       this(null, bindings.CResult_TxCreationKeysSecpErrorZ_ok(res == null ? 0 : res.ptr & ~1));
-                       this.ptrs_to.add(res);
-               }
-       }
-
-       public static final class Result_TxCreationKeysSecpErrorZ_Err extends Result_TxCreationKeysSecpErrorZ {
-               public final LDKSecp256k1Error err;
-               private Result_TxCreationKeysSecpErrorZ_Err(Object _dummy, long ptr) {
-                       super(_dummy, ptr);
-                       this.err = bindings.LDKCResult_TxCreationKeysSecpErrorZ_get_err(ptr);
-               }
-               public Result_TxCreationKeysSecpErrorZ_Err(LDKSecp256k1Error err) {
-                       this(null, bindings.CResult_TxCreationKeysSecpErrorZ_err(err));
-               }
-       }
-}
diff --git a/ts/structs/Result_UpdateAddHTLCDecodeErrorZ.ts b/ts/structs/Result_UpdateAddHTLCDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..5e1b94f
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_UpdateAddHTLCDecodeErrorZ extends CommonBase {
+       private Result_UpdateAddHTLCDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UpdateAddHTLCDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_UpdateAddHTLCDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_UpdateAddHTLCDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_UpdateAddHTLCDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UpdateAddHTLCDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UpdateAddHTLCDecodeErrorZ_OK extends Result_UpdateAddHTLCDecodeErrorZ {
+               public final UpdateAddHTLC res;
+               private Result_UpdateAddHTLCDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_UpdateAddHTLCDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_UpdateAddHTLCDecodeErrorZ_OK(UpdateAddHTLC res) {
+                       this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_UpdateAddHTLCDecodeErrorZ_Err extends Result_UpdateAddHTLCDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UpdateAddHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_UpdateAddHTLCDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_UpdateAddHTLCDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_UpdateAddHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_UpdateFailHTLCDecodeErrorZ.ts b/ts/structs/Result_UpdateFailHTLCDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..f1b6b73
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_UpdateFailHTLCDecodeErrorZ extends CommonBase {
+       private Result_UpdateFailHTLCDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UpdateFailHTLCDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_UpdateFailHTLCDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_UpdateFailHTLCDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_UpdateFailHTLCDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UpdateFailHTLCDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UpdateFailHTLCDecodeErrorZ_OK extends Result_UpdateFailHTLCDecodeErrorZ {
+               public final UpdateFailHTLC res;
+               private Result_UpdateFailHTLCDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_UpdateFailHTLCDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: UpdateFailHTLC = new UpdateFailHTLC(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_UpdateFailHTLCDecodeErrorZ_OK(UpdateFailHTLC res) {
+                       this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_UpdateFailHTLCDecodeErrorZ_Err extends Result_UpdateFailHTLCDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UpdateFailHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_UpdateFailHTLCDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_UpdateFailHTLCDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_UpdateFailHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.ts b/ts/structs/Result_UpdateFailMalformedHTLCDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..8b05b5a
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_UpdateFailMalformedHTLCDecodeErrorZ extends CommonBase {
+       private Result_UpdateFailMalformedHTLCDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_UpdateFailMalformedHTLCDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UpdateFailMalformedHTLCDecodeErrorZ_OK extends Result_UpdateFailMalformedHTLCDecodeErrorZ {
+               public final UpdateFailMalformedHTLC res;
+               private Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_UpdateFailMalformedHTLCDecodeErrorZ_OK(UpdateFailMalformedHTLC res) {
+                       this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_UpdateFailMalformedHTLCDecodeErrorZ_Err extends Result_UpdateFailMalformedHTLCDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_UpdateFailMalformedHTLCDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_UpdateFailMalformedHTLCDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_UpdateFailMalformedHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_UpdateFeeDecodeErrorZ.ts b/ts/structs/Result_UpdateFeeDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..abb01dd
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_UpdateFeeDecodeErrorZ extends CommonBase {
+       private Result_UpdateFeeDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UpdateFeeDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_UpdateFeeDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_UpdateFeeDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_UpdateFeeDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UpdateFeeDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UpdateFeeDecodeErrorZ_OK extends Result_UpdateFeeDecodeErrorZ {
+               public final UpdateFee res;
+               private Result_UpdateFeeDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_UpdateFeeDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: UpdateFee = new UpdateFee(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_UpdateFeeDecodeErrorZ_OK(UpdateFee res) {
+                       this(null, bindings.CResult_UpdateFeeDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_UpdateFeeDecodeErrorZ_Err extends Result_UpdateFeeDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UpdateFeeDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_UpdateFeeDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_UpdateFeeDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_UpdateFeeDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
diff --git a/ts/structs/Result_UpdateFulfillHTLCDecodeErrorZ.ts b/ts/structs/Result_UpdateFulfillHTLCDecodeErrorZ.ts
new file mode 100644 (file)
index 0000000..4899f6f
--- /dev/null
@@ -0,0 +1,47 @@
+
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+public class Result_UpdateFulfillHTLCDecodeErrorZ extends CommonBase {
+       private Result_UpdateFulfillHTLCDecodeErrorZ(Object _dummy, long ptr) { super(ptr); }
+       protected void finalize() throws Throwable {
+               if (ptr != 0) { bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_free(ptr); } super.finalize();
+       }
+
+       static Result_UpdateFulfillHTLCDecodeErrorZ constr_from_ptr(long ptr) {
+               if (bindings.LDKCResult_UpdateFulfillHTLCDecodeErrorZ_result_ok(ptr)) {
+                       return new Result_UpdateFulfillHTLCDecodeErrorZ_OK(null, ptr);
+               } else {
+                       return new Result_UpdateFulfillHTLCDecodeErrorZ_Err(null, ptr);
+               }
+       }
+       public static final class Result_UpdateFulfillHTLCDecodeErrorZ_OK extends Result_UpdateFulfillHTLCDecodeErrorZ {
+               public final UpdateFulfillHTLC res;
+               private Result_UpdateFulfillHTLCDecodeErrorZ_OK(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number res = bindings.LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_ok(ptr);
+                       const res_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, res);
+                       res_hu_conv.ptrs_to.add(this);
+                       this.res = res_hu_conv;
+               }
+               public Result_UpdateFulfillHTLCDecodeErrorZ_OK(UpdateFulfillHTLC res) {
+                       this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_ok(res == null ? 0 : res.ptr & ~1));
+                       this.ptrs_to.add(res);
+               }
+       }
+
+       public static final class Result_UpdateFulfillHTLCDecodeErrorZ_Err extends Result_UpdateFulfillHTLCDecodeErrorZ {
+               public final DecodeError err;
+               private Result_UpdateFulfillHTLCDecodeErrorZ_Err(Object _dummy, long ptr) {
+                       super(_dummy, ptr);
+                       number err = bindings.LDKCResult_UpdateFulfillHTLCDecodeErrorZ_get_err(ptr);
+                       const err_hu_conv: DecodeError = new DecodeError(null, err);
+                       err_hu_conv.ptrs_to.add(this);
+                       this.err = err_hu_conv;
+               }
+               public Result_UpdateFulfillHTLCDecodeErrorZ_Err(DecodeError err) {
+                       this(null, bindings.CResult_UpdateFulfillHTLCDecodeErrorZ_err(err == null ? 0 : err.ptr & ~1));
+                       this.ptrs_to.add(err);
+               }
+       }
+}
index 15b9945b58350c9bcfe9bb4061cc528b817a952e..d521246952e6f179e61e07076dab1efe544ba542 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.RevokeAndACK_free(this.ptr);
                     }
                 }
-       public RevokeAndACK clone() {
-               number ret = bindings.RevokeAndACK_clone(this.ptr);
-               const ret_hu_conv: RevokeAndACK = new RevokeAndACK(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.RevokeAndACK_get_channel_id(this.ptr);
                return ret;
@@ -59,15 +52,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public RevokeAndACK clone() {
+               number ret = bindings.RevokeAndACK_clone(this.ptr);
+               const ret_hu_conv: RevokeAndACK = new RevokeAndACK(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.RevokeAndACK_write(this.ptr);
                return ret;
        }
 
-       public static RevokeAndACK constructor_read(Uint8Array ser) {
+       public static Result_RevokeAndACKDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.RevokeAndACK_read(ser);
-               const ret_hu_conv: RevokeAndACK = new RevokeAndACK(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_RevokeAndACKDecodeErrorZ ret_hu_conv = Result_RevokeAndACKDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index e8d32809419fc467438833f22a9cbf6da29d564a..737c9b019e569b0c57a777bb51b13252721d9433 100644 (file)
@@ -18,26 +18,26 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.Route_free(this.ptr);
                     }
                 }
-       public Route clone() {
-               number ret = bindings.Route_clone(this.ptr);
-               const ret_hu_conv: Route = new Route(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public void set_paths(RouteHop[][] val) {
-               bindings.Route_set_paths(this.ptr, (number[][])Arrays.stream(val).map(arr_conv_12 -> (number[])Arrays.stream(arr_conv_12).map(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray());
+               bindings.Route_set_paths(this.ptr, Arrays.stream(val).map(val_conv_12 -> Arrays.stream(val_conv_12).map(val_conv_12_conv_10 -> val_conv_12_conv_10 == null ? 0 : val_conv_12_conv_10.ptr & ~1).toArray(number[]::new)).toArray(number[][]::new));
                /* TODO 2 RouteHop[]  */;
        }
 
        public static Route constructor_new(RouteHop[][] paths_arg) {
-               number ret = bindings.Route_new((number[][])Arrays.stream(paths_arg).map(arr_conv_12 -> (number[])Arrays.stream(arr_conv_12).map(arr_conv_10 -> arr_conv_10 == null ? 0 : arr_conv_10.ptr & ~1).toArray()).toArray());
+               number ret = bindings.Route_new(Arrays.stream(paths_arg).map(paths_arg_conv_12 -> Arrays.stream(paths_arg_conv_12).map(paths_arg_conv_12_conv_10 -> paths_arg_conv_12_conv_10 == null ? 0 : paths_arg_conv_12_conv_10.ptr & ~1).toArray(number[]::new)).toArray(number[][]::new));
                const ret_hu_conv: Route = new Route(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                /* TODO 2 RouteHop[]  */;
                return ret_hu_conv;
        }
 
+       public Route clone() {
+               number ret = bindings.Route_clone(this.ptr);
+               const ret_hu_conv: Route = new Route(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.Route_write(this.ptr);
                return ret;
index a5e312e95ae591eccc5ea4c801a8904754fbfcfd..9e0474f570694d33499e9c6882b70c13383f0354 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.RouteHint_free(this.ptr);
                     }
                 }
-       public RouteHint clone() {
-               number ret = bindings.RouteHint_clone(this.ptr);
-               const ret_hu_conv: RouteHint = new RouteHint(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_src_node_id() {
                Uint8Array ret = bindings.RouteHint_get_src_node_id(this.ptr);
                return ret;
@@ -64,20 +57,10 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.RouteHint_set_cltv_expiry_delta(this.ptr, val);
        }
 
-       public number get_htlc_minimum_msat() {
-               number ret = bindings.RouteHint_get_htlc_minimum_msat(this.ptr);
-               return ret;
-       }
-
-       public void set_htlc_minimum_msat(number val) {
-               bindings.RouteHint_set_htlc_minimum_msat(this.ptr, val);
-       }
-
-       public static RouteHint constructor_new(Uint8Array src_node_id_arg, number short_channel_id_arg, RoutingFees fees_arg, number cltv_expiry_delta_arg, number htlc_minimum_msat_arg) {
-               number ret = bindings.RouteHint_new(src_node_id_arg, short_channel_id_arg, fees_arg == null ? 0 : fees_arg.ptr & ~1, cltv_expiry_delta_arg, htlc_minimum_msat_arg);
+       public RouteHint clone() {
+               number ret = bindings.RouteHint_clone(this.ptr);
                const ret_hu_conv: RouteHint = new RouteHint(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
-               ret_hu_conv.ptrs_to.add(fees_arg);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
index f03f698946c28badb6ab6702ea519b94eee9c016..3d9e3386c2603688842128fb542778444e23a85c 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.RouteHop_free(this.ptr);
                     }
                 }
-       public RouteHop clone() {
-               number ret = bindings.RouteHop_clone(this.ptr);
-               const ret_hu_conv: RouteHop = new RouteHop(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_pubkey() {
                Uint8Array ret = bindings.RouteHop_get_pubkey(this.ptr);
                return ret;
@@ -44,14 +37,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_node_features(NodeFeatures val) {
                bindings.RouteHop_set_node_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public number get_short_channel_id() {
@@ -73,14 +58,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_channel_features(ChannelFeatures val) {
                bindings.RouteHop_set_channel_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public number get_fee_msat() {
@@ -106,23 +83,14 @@ import * as bindings from '../bindings' // TODO: figure out location
                const ret_hu_conv: RouteHop = new RouteHop(null, ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
                ret_hu_conv.ptrs_to.add(node_features_arg);
-               // 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, node_features_arg is reset to null and is now a dummy object.
-               node_features_arg.ptr = 0;
                ret_hu_conv.ptrs_to.add(channel_features_arg);
-               // 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, channel_features_arg is reset to null and is now a dummy object.
-               channel_features_arg.ptr = 0;
+               return ret_hu_conv;
+       }
+
+       public RouteHop clone() {
+               number ret = bindings.RouteHop_clone(this.ptr);
+               const ret_hu_conv: RouteHop = new RouteHop(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
                return ret_hu_conv;
        }
 
index f71fd081fb6e6bb8ebfa874503250fa21e9a4234..e046cbe5851781485bc2bccc68aee51581a5200f 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.RoutingFees_free(this.ptr);
                     }
                 }
-       public RoutingFees clone() {
-               number ret = bindings.RoutingFees_clone(this.ptr);
-               const ret_hu_conv: RoutingFees = new RoutingFees(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public number get_base_msat() {
                number ret = bindings.RoutingFees_get_base_msat(this.ptr);
                return ret;
@@ -50,6 +43,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public RoutingFees clone() {
+               number ret = bindings.RoutingFees_clone(this.ptr);
+               const ret_hu_conv: RoutingFees = new RoutingFees(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static Result_RoutingFeesDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.RoutingFees_read(ser);
                Result_RoutingFeesDecodeErrorZ ret_hu_conv = Result_RoutingFeesDecodeErrorZ.constr_from_ptr(ret);
index 28552c66dbc37ce7a9742597c4e6a3bd5faffe09..04d3d5f54e87a252953cde2e8b96a2923c542834 100644 (file)
@@ -61,14 +61,14 @@ import * as bindings from '../bindings' // TODO: figure out location
 
                                                get_next_channel_announcements (starting_point: number, batch_amount: number): number[] {
                                                        ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret = arg.get_next_channel_announcements(starting_point, batch_amount);
-                               result: number[] = (number[])Arrays.stream(ret).map(arr_conv_63 -> bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(arr_conv_63.a == null ? 0 : arr_conv_63.a.ptr & ~1, arr_conv_63.b == null ? 0 : arr_conv_63.b.ptr & ~1, arr_conv_63.c == null ? 0 : arr_conv_63.c.ptr & ~1)).toArray();
+                               result: number[] = Arrays.stream(ret).map(ret_conv_63 -> bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_new(ret_conv_63.a == null ? 0 : ret_conv_63.a.ptr & ~1, ret_conv_63.b == null ? 0 : ret_conv_63.b.ptr & ~1, ret_conv_63.c == null ? 0 : ret_conv_63.c.ptr & ~1)).toArray(number[]::new);
                                /* TODO 2 ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>  */;
                                return result;
                                                },
 
                                                get_next_node_announcements (starting_point: Uint8Array, batch_amount: number): number[] {
                                                        NodeAnnouncement[] ret = arg.get_next_node_announcements(starting_point, batch_amount);
-                               result: number[] = (number[])Arrays.stream(ret).map(arr_conv_18 -> arr_conv_18 == null ? 0 : arr_conv_18.ptr & ~1).toArray();
+                               result: number[] = Arrays.stream(ret).map(ret_conv_18 -> ret_conv_18 == null ? 0 : ret_conv_18.ptr & ~1).toArray(number[]::new);
                                /* TODO 2 NodeAnnouncement  */;
                                return result;
                                                },
@@ -162,39 +162,39 @@ import * as bindings from '../bindings' // TODO: figure out location
 
        public ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] get_next_channel_announcements(number starting_point, number batch_amount) {
                number[] ret = bindings.RoutingMessageHandler_get_next_channel_announcements(this.ptr, starting_point, batch_amount);
-               ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] arr_conv_63_arr = new ThreeTuple[ret.length];
+               ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>[] ret_conv_63_arr = new ThreeTuple[ret.length];
                for (int l = 0; l < ret.length; l++) {
-                       number arr_conv_63 = ret[l];
-                       number arr_conv_63_a = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(arr_conv_63);
-                       const arr_conv_63_a_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, arr_conv_63_a);
-                       arr_conv_63_a_hu_conv.ptrs_to.add(this);;
-                       number arr_conv_63_b = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(arr_conv_63);
-                       const arr_conv_63_b_hu_conv: ChannelUpdate = new ChannelUpdate(null, arr_conv_63_b);
-                       arr_conv_63_b_hu_conv.ptrs_to.add(this);;
-                       number arr_conv_63_c = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(arr_conv_63);
-                       const arr_conv_63_c_hu_conv: ChannelUpdate = new ChannelUpdate(null, arr_conv_63_c);
-                       arr_conv_63_c_hu_conv.ptrs_to.add(this);;
-                       ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> arr_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(arr_conv_63_a_hu_conv, arr_conv_63_b_hu_conv, arr_conv_63_c_hu_conv, () -> {
-                               bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(arr_conv_63);
+                       number ret_conv_63 = ret[l];
+                       number ret_conv_63_a = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_a(ret_conv_63);
+                       const ret_conv_63_a_hu_conv: ChannelAnnouncement = new ChannelAnnouncement(null, ret_conv_63_a);
+                       ret_conv_63_a_hu_conv.ptrs_to.add(this);;
+                       number ret_conv_63_b = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_b(ret_conv_63);
+                       const ret_conv_63_b_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret_conv_63_b);
+                       ret_conv_63_b_hu_conv.ptrs_to.add(this);;
+                       number ret_conv_63_c = bindings.LDKC3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_get_c(ret_conv_63);
+                       const ret_conv_63_c_hu_conv: ChannelUpdate = new ChannelUpdate(null, ret_conv_63_c);
+                       ret_conv_63_c_hu_conv.ptrs_to.add(this);;
+                       ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate> ret_conv_63_conv = new ThreeTuple<ChannelAnnouncement, ChannelUpdate, ChannelUpdate>(ret_conv_63_a_hu_conv, ret_conv_63_b_hu_conv, ret_conv_63_c_hu_conv, () -> {
+                               bindings.C3Tuple_ChannelAnnouncementChannelUpdateChannelUpdateZ_free(ret_conv_63);
                        });
-                       arr_conv_63_a_hu_conv.ptrs_to.add(arr_conv_63_conv);
-                       arr_conv_63_b_hu_conv.ptrs_to.add(arr_conv_63_conv);
-                       arr_conv_63_c_hu_conv.ptrs_to.add(arr_conv_63_conv);
-                       arr_conv_63_arr[l] = arr_conv_63_conv;
+                       ret_conv_63_a_hu_conv.ptrs_to.add(ret_conv_63_conv);
+                       ret_conv_63_b_hu_conv.ptrs_to.add(ret_conv_63_conv);
+                       ret_conv_63_c_hu_conv.ptrs_to.add(ret_conv_63_conv);
+                       ret_conv_63_arr[l] = ret_conv_63_conv;
                }
-               return arr_conv_63_arr;
+               return ret_conv_63_arr;
        }
 
        public NodeAnnouncement[] get_next_node_announcements(Uint8Array starting_point, number batch_amount) {
                number[] ret = bindings.RoutingMessageHandler_get_next_node_announcements(this.ptr, starting_point, batch_amount);
-               NodeAnnouncement[] arr_conv_18_arr = new NodeAnnouncement[ret.length];
+               NodeAnnouncement[] ret_conv_18_arr = new NodeAnnouncement[ret.length];
                for (int s = 0; s < ret.length; s++) {
-                       number arr_conv_18 = ret[s];
-                       const arr_conv_18_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, arr_conv_18);
-                       arr_conv_18_hu_conv.ptrs_to.add(this);
-                       arr_conv_18_arr[s] = arr_conv_18_hu_conv;
+                       number ret_conv_18 = ret[s];
+                       const ret_conv_18_hu_conv: NodeAnnouncement = new NodeAnnouncement(null, ret_conv_18);
+                       ret_conv_18_hu_conv.ptrs_to.add(this);
+                       ret_conv_18_arr[s] = ret_conv_18_hu_conv;
                }
-               return arr_conv_18_arr;
+               return ret_conv_18_arr;
        }
 
        public void sync_routing_table(Uint8Array their_node_id, Init init) {
index 0301af6b6890d0ecc899bd2255389e1be56d8bb5..3c50548ba8afbd06d5b0d9b4fff813073b330f98 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.Shutdown_free(this.ptr);
                     }
                 }
-       public Shutdown clone() {
-               number ret = bindings.Shutdown_clone(this.ptr);
-               const ret_hu_conv: Shutdown = new Shutdown(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.Shutdown_get_channel_id(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public Shutdown clone() {
+               number ret = bindings.Shutdown_clone(this.ptr);
+               const ret_hu_conv: Shutdown = new Shutdown(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.Shutdown_write(this.ptr);
                return ret;
        }
 
-       public static Shutdown constructor_read(Uint8Array ser) {
+       public static Result_ShutdownDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.Shutdown_read(ser);
-               const ret_hu_conv: Shutdown = new Shutdown(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_ShutdownDecodeErrorZ ret_hu_conv = Result_ShutdownDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
diff --git a/ts/structs/Sign.ts b/ts/structs/Sign.ts
new file mode 100644 (file)
index 0000000..641c324
--- /dev/null
@@ -0,0 +1,206 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export class Sign extends CommonBase {
+
+                bindings_instance?: bindings.LDKSign;
+
+                constructor(ptr?: number, arg?: bindings.LDKSign, pubkeys?: ChannelPublicKeys) {
+                    if (Number.isFinite(ptr)) {
+                                       super(ptr);
+                                       this.bindings_instance = null;
+                                   } else {
+                                       // TODO: private constructor instantiation
+                                       super(bindings.LDKSign_new(arg, pubkeys == null ? 0 : pubkeys.ptr & ~1));
+                                       this.ptrs_to.push(arg);
+                                       this.ptrs_to.add(pubkeys);
+
+                                   }
+                }
+
+                protected finalize() {
+                    if (this.ptr != 0) {
+                        bindings.Sign_free(this.ptr);
+                    }
+                    super.finalize();
+                }
+
+                static new_impl(arg: SignInterface, pubkeys: ChannelPublicKeys): Sign {
+                    const impl_holder: LDKSignHolder = new LDKSignHolder();
+                    let structImplementation = <bindings.LDKSign>{
+                        // todo: in-line interface filling
+                        get_per_commitment_point (idx: number): Uint8Array {
+                                                       Uint8Array ret = arg.get_per_commitment_point(idx);
+                               return ret;
+                                               },
+
+                                               release_commitment_secret (idx: number): Uint8Array {
+                                                       Uint8Array ret = arg.release_commitment_secret(idx);
+                               return ret;
+                                               },
+
+                                               channel_keys_id (): Uint8Array {
+                                                       Uint8Array ret = arg.channel_keys_id();
+                               return ret;
+                                               },
+
+                                               sign_counterparty_commitment (commitment_tx: number): number {
+                                                       const commitment_tx_hu_conv: CommitmentTransaction = new CommitmentTransaction(null, commitment_tx);
+                                                       Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = arg.sign_counterparty_commitment(commitment_tx_hu_conv);
+                               result: number = ret != null ? ret.ptr : 0;
+                               return result;
+                                               },
+
+                                               sign_holder_commitment_and_htlcs (commitment_tx: number): number {
+                                                       const commitment_tx_hu_conv: HolderCommitmentTransaction = new HolderCommitmentTransaction(null, commitment_tx);
+                                                       Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret = arg.sign_holder_commitment_and_htlcs(commitment_tx_hu_conv);
+                               result: number = ret != null ? ret.ptr : 0;
+                               return result;
+                                               },
+
+                                               sign_justice_transaction (justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: number): number {
+                                                       const htlc_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, htlc);
+                                                       Result_SignatureNoneZ ret = arg.sign_justice_transaction(justice_tx, input, amount, per_commitment_key, htlc_hu_conv);
+                               result: number = ret != null ? ret.ptr : 0;
+                               return result;
+                                               },
+
+                                               sign_counterparty_htlc_transaction (htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: number): number {
+                                                       const htlc_hu_conv: HTLCOutputInCommitment = new HTLCOutputInCommitment(null, htlc);
+                                                       Result_SignatureNoneZ ret = arg.sign_counterparty_htlc_transaction(htlc_tx, input, amount, per_commitment_point, htlc_hu_conv);
+                               result: number = ret != null ? ret.ptr : 0;
+                               return result;
+                                               },
+
+                                               sign_closing_transaction (closing_tx: Uint8Array): number {
+                                                       Result_SignatureNoneZ ret = arg.sign_closing_transaction(closing_tx);
+                               result: number = ret != null ? ret.ptr : 0;
+                               return result;
+                                               },
+
+                                               sign_channel_announcement (msg: number): number {
+                                                       const msg_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, msg);
+                                                       Result_SignatureNoneZ ret = arg.sign_channel_announcement(msg_hu_conv);
+                               result: number = ret != null ? ret.ptr : 0;
+                               return result;
+                                               },
+
+                                               ready_channel (channel_parameters: number): void {
+                                                       const channel_parameters_hu_conv: ChannelTransactionParameters = new ChannelTransactionParameters(null, channel_parameters);
+                                                       arg.ready_channel(channel_parameters_hu_conv);
+                                               },
+
+                                               write (): Uint8Array {
+                                                       Uint8Array ret = arg.write();
+                               return ret;
+                                               },
+
+                                               
+                    };
+                    impl_holder.held = new Sign (null, structImplementation, pubkeys);
+                }
+            }
+
+            export interface SignInterface {
+                get_per_commitment_point(idx: number): Uint8Array;
+                               release_commitment_secret(idx: number): Uint8Array;
+                               channel_keys_id(): Uint8Array;
+                               sign_counterparty_commitment(commitment_tx: CommitmentTransaction): Result_C2Tuple_SignatureCVec_SignatureZZNoneZ;
+                               sign_holder_commitment_and_htlcs(commitment_tx: HolderCommitmentTransaction): Result_C2Tuple_SignatureCVec_SignatureZZNoneZ;
+                               sign_justice_transaction(justice_tx: Uint8Array, input: number, amount: number, per_commitment_key: Uint8Array, htlc: HTLCOutputInCommitment): Result_SignatureNoneZ;
+                               sign_counterparty_htlc_transaction(htlc_tx: Uint8Array, input: number, amount: number, per_commitment_point: Uint8Array, htlc: HTLCOutputInCommitment): Result_SignatureNoneZ;
+                               sign_closing_transaction(closing_tx: Uint8Array): Result_SignatureNoneZ;
+                               sign_channel_announcement(msg: UnsignedChannelAnnouncement): Result_SignatureNoneZ;
+                               ready_channel(channel_parameters: ChannelTransactionParameters): void;
+                               write(): Uint8Array;
+                               
+            }
+
+            class LDKSignHolder {
+                held: Sign;
+            }
+       public Uint8Array get_per_commitment_point(number idx) {
+               Uint8Array ret = bindings.Sign_get_per_commitment_point(this.ptr, idx);
+               return ret;
+       }
+
+       public Uint8Array release_commitment_secret(number idx) {
+               Uint8Array ret = bindings.Sign_release_commitment_secret(this.ptr, idx);
+               return ret;
+       }
+
+       public Uint8Array channel_keys_id() {
+               Uint8Array ret = bindings.Sign_channel_keys_id(this.ptr);
+               return ret;
+       }
+
+       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_counterparty_commitment(CommitmentTransaction commitment_tx) {
+               number ret = bindings.Sign_sign_counterparty_commitment(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr & ~1);
+               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(commitment_tx);
+               return ret_hu_conv;
+       }
+
+       public Result_C2Tuple_SignatureCVec_SignatureZZNoneZ sign_holder_commitment_and_htlcs(HolderCommitmentTransaction commitment_tx) {
+               number ret = bindings.Sign_sign_holder_commitment_and_htlcs(this.ptr, commitment_tx == null ? 0 : commitment_tx.ptr & ~1);
+               Result_C2Tuple_SignatureCVec_SignatureZZNoneZ ret_hu_conv = Result_C2Tuple_SignatureCVec_SignatureZZNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(commitment_tx);
+               return ret_hu_conv;
+       }
+
+       public Result_SignatureNoneZ sign_justice_transaction(Uint8Array justice_tx, number input, number amount, Uint8Array per_commitment_key, HTLCOutputInCommitment htlc) {
+               number ret = bindings.Sign_sign_justice_transaction(this.ptr, justice_tx, input, amount, per_commitment_key, htlc == null ? 0 : htlc.ptr & ~1);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(htlc);
+               return ret_hu_conv;
+       }
+
+       public Result_SignatureNoneZ sign_counterparty_htlc_transaction(Uint8Array htlc_tx, number input, number amount, Uint8Array per_commitment_point, HTLCOutputInCommitment htlc) {
+               number ret = bindings.Sign_sign_counterparty_htlc_transaction(this.ptr, htlc_tx, input, amount, per_commitment_point, htlc == null ? 0 : htlc.ptr & ~1);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(htlc);
+               return ret_hu_conv;
+       }
+
+       public Result_SignatureNoneZ sign_closing_transaction(Uint8Array closing_tx) {
+               number ret = bindings.Sign_sign_closing_transaction(this.ptr, closing_tx);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               return ret_hu_conv;
+       }
+
+       public Result_SignatureNoneZ sign_channel_announcement(UnsignedChannelAnnouncement msg) {
+               number ret = bindings.Sign_sign_channel_announcement(this.ptr, msg == null ? 0 : msg.ptr & ~1);
+               Result_SignatureNoneZ ret_hu_conv = Result_SignatureNoneZ.constr_from_ptr(ret);
+               this.ptrs_to.add(msg);
+               return ret_hu_conv;
+       }
+
+       public void ready_channel(ChannelTransactionParameters channel_parameters) {
+               bindings.Sign_ready_channel(this.ptr, channel_parameters == null ? 0 : channel_parameters.ptr & ~1);
+               this.ptrs_to.add(channel_parameters);
+       }
+
+       public Uint8Array write() {
+               Uint8Array ret = bindings.Sign_write(this.ptr);
+               return ret;
+       }
+
+       public ChannelPublicKeys get_pubkeys() {
+               number ret = bindings.Sign_get_pubkeys(this.ptr);
+               const ret_hu_conv: ChannelPublicKeys = new ChannelPublicKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public Sign clone() {
+               number ret = bindings.Sign_clone(this.ptr);
+               Sign ret_hu_conv = new Sign(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}
index 005b9741b6f967c585df9e2ef3c46203ac57381d..b2481d75d6f97322db917c3c8f5e155676f0f92a 100644 (file)
@@ -13,11 +13,11 @@ export default class SpendableOutputDescriptor extends CommonBase {
                if (raw_val instanceof bindings.LDKSpendableOutputDescriptor.StaticOutput) {
                        return new StaticOutput(this.ptr, raw_val);
                }
-               if (raw_val instanceof bindings.LDKSpendableOutputDescriptor.DynamicOutputP2WSH) {
-                       return new DynamicOutputP2WSH(this.ptr, raw_val);
+               if (raw_val instanceof bindings.LDKSpendableOutputDescriptor.DelayedPaymentOutput) {
+                       return new DelayedPaymentOutput(this.ptr, raw_val);
                }
-               if (raw_val instanceof bindings.LDKSpendableOutputDescriptor.StaticOutputCounterpartyPayment) {
-                       return new StaticOutputCounterpartyPayment(this.ptr, raw_val);
+               if (raw_val instanceof bindings.LDKSpendableOutputDescriptor.StaticPaymentOutput) {
+                       return new StaticPaymentOutput(this.ptr, raw_val);
                }
                throw new Error('oops, this should be unreachable'); // Unreachable without extending the (internal) bindings interface
        }
@@ -37,53 +37,13 @@ export class StaticOutput extends SpendableOutputDescriptor {
                this.output = output_conv;
        }
 }
-export class DynamicOutputP2WSH extends SpendableOutputDescriptor {
-       public outpoint: OutPoint;
-       public per_commitment_point: Uint8Array;
-       public to_self_delay: number;
-       public output: TxOut;
-       public key_derivation_params: TwoTuple<Number, Number>;
-       public revocation_pubkey: Uint8Array;
-       private constructor(ptr: number, obj: bindings.LDKSpendableOutputDescriptor.DynamicOutputP2WSH) {
+export class DelayedPaymentOutput extends SpendableOutputDescriptor {
+       private constructor(ptr: number, obj: bindings.LDKSpendableOutputDescriptor.DelayedPaymentOutput) {
                super(null, ptr);
-               const outpoint: number = obj.outpoint;
-               const outpoint_hu_conv: OutPoint = new OutPoint(null, outpoint);
-                       outpoint_hu_conv.ptrs_to.add(this);
-               this.outpoint = outpoint_hu_conv;
-               this.per_commitment_point = obj.per_commitment_point;
-               this.to_self_delay = obj.to_self_delay;
-               const output: number = obj.output;
-               TxOut output_conv = new TxOut(null, output);
-               this.output = output_conv;
-               const key_derivation_params: number = obj.key_derivation_params;
-               number key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params);
-                       number key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params);
-                       TwoTuple<Number, Number> key_derivation_params_conv = new TwoTuple<Number, Number>(key_derivation_params_a, key_derivation_params_b, () -> {
-                               bindings.C2Tuple_u64u64Z_free(key_derivation_params);
-                       });
-               this.key_derivation_params = key_derivation_params_conv;
-               this.revocation_pubkey = obj.revocation_pubkey;
        }
 }
-export class StaticOutputCounterpartyPayment extends SpendableOutputDescriptor {
-       public outpoint: OutPoint;
-       public output: TxOut;
-       public key_derivation_params: TwoTuple<Number, Number>;
-       private constructor(ptr: number, obj: bindings.LDKSpendableOutputDescriptor.StaticOutputCounterpartyPayment) {
+export class StaticPaymentOutput extends SpendableOutputDescriptor {
+       private constructor(ptr: number, obj: bindings.LDKSpendableOutputDescriptor.StaticPaymentOutput) {
                super(null, ptr);
-               const outpoint: number = obj.outpoint;
-               const outpoint_hu_conv: OutPoint = new OutPoint(null, outpoint);
-                       outpoint_hu_conv.ptrs_to.add(this);
-               this.outpoint = outpoint_hu_conv;
-               const output: number = obj.output;
-               TxOut output_conv = new TxOut(null, output);
-               this.output = output_conv;
-               const key_derivation_params: number = obj.key_derivation_params;
-               number key_derivation_params_a = bindings.LDKC2Tuple_u64u64Z_get_a(key_derivation_params);
-                       number key_derivation_params_b = bindings.LDKC2Tuple_u64u64Z_get_b(key_derivation_params);
-                       TwoTuple<Number, Number> key_derivation_params_conv = new TwoTuple<Number, Number>(key_derivation_params_a, key_derivation_params_b, () -> {
-                               bindings.C2Tuple_u64u64Z_free(key_derivation_params);
-                       });
-               this.key_derivation_params = key_derivation_params_conv;
        }
 }
diff --git a/ts/structs/StaticPaymentOutputDescriptor.ts b/ts/structs/StaticPaymentOutputDescriptor.ts
new file mode 100644 (file)
index 0000000..f4585c8
--- /dev/null
@@ -0,0 +1,70 @@
+
+            
+import CommonBase from './CommonBase';
+import * as bindings from '../bindings' // TODO: figure out location
+
+
+
+            export default class StaticPaymentOutputDescriptor extends CommonBase {
+                constructor(_dummy: object, ptr: number) {
+                    super(ptr);
+                }
+
+                
+                protected finalize() {
+                    super.finalize();
+
+                    if (this.ptr != 0) {
+                        bindings.StaticPaymentOutputDescriptor_free(this.ptr);
+                    }
+                }
+       public OutPoint get_outpoint() {
+               number ret = bindings.StaticPaymentOutputDescriptor_get_outpoint(this.ptr);
+               const ret_hu_conv: OutPoint = new OutPoint(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+       public void set_outpoint(OutPoint val) {
+               bindings.StaticPaymentOutputDescriptor_set_outpoint(this.ptr, val == null ? 0 : val.ptr & ~1);
+               this.ptrs_to.add(val);
+       }
+
+       public void set_output(TxOut val) {
+               bindings.StaticPaymentOutputDescriptor_set_output(this.ptr, val.ptr);
+       }
+
+       public Uint8Array get_channel_keys_id() {
+               Uint8Array ret = bindings.StaticPaymentOutputDescriptor_get_channel_keys_id(this.ptr);
+               return ret;
+       }
+
+       public void set_channel_keys_id(Uint8Array val) {
+               bindings.StaticPaymentOutputDescriptor_set_channel_keys_id(this.ptr, val);
+       }
+
+       public number get_channel_value_satoshis() {
+               number ret = bindings.StaticPaymentOutputDescriptor_get_channel_value_satoshis(this.ptr);
+               return ret;
+       }
+
+       public void set_channel_value_satoshis(number val) {
+               bindings.StaticPaymentOutputDescriptor_set_channel_value_satoshis(this.ptr, val);
+       }
+
+       public static StaticPaymentOutputDescriptor constructor_new(OutPoint outpoint_arg, TxOut output_arg, Uint8Array channel_keys_id_arg, number channel_value_satoshis_arg) {
+               number ret = bindings.StaticPaymentOutputDescriptor_new(outpoint_arg == null ? 0 : outpoint_arg.ptr & ~1, output_arg.ptr, channel_keys_id_arg, channel_value_satoshis_arg);
+               const ret_hu_conv: StaticPaymentOutputDescriptor = new StaticPaymentOutputDescriptor(null, ret);
+               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               ret_hu_conv.ptrs_to.add(outpoint_arg);
+               return ret_hu_conv;
+       }
+
+       public StaticPaymentOutputDescriptor clone() {
+               number ret = bindings.StaticPaymentOutputDescriptor_clone(this.ptr);
+               const ret_hu_conv: StaticPaymentOutputDescriptor = new StaticPaymentOutputDescriptor(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
+}
index 1b8b616b6d6baae060312549783f511b044f6e44..e6af3f27352c5cd6aed0d518cc6595ff797cba9f 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.TxCreationKeys_free(this.ptr);
                     }
                 }
-       public TxCreationKeys clone() {
-               number ret = bindings.TxCreationKeys_clone(this.ptr);
-               const ret_hu_conv: TxCreationKeys = new TxCreationKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_per_commitment_point() {
                Uint8Array ret = bindings.TxCreationKeys_get_per_commitment_point(this.ptr);
                return ret;
@@ -77,27 +70,33 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public TxCreationKeys clone() {
+               number ret = bindings.TxCreationKeys_clone(this.ptr);
+               const ret_hu_conv: TxCreationKeys = new TxCreationKeys(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.TxCreationKeys_write(this.ptr);
                return ret;
        }
 
-       public static TxCreationKeys constructor_read(Uint8Array ser) {
+       public static Result_TxCreationKeysDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.TxCreationKeys_read(ser);
-               const ret_hu_conv: TxCreationKeys = new TxCreationKeys(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_TxCreationKeysDecodeErrorZ ret_hu_conv = Result_TxCreationKeysDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_TxCreationKeysSecpErrorZ constructor_derive_new(Uint8Array per_commitment_point, Uint8Array broadcaster_delayed_payment_base, Uint8Array broadcaster_htlc_base, Uint8Array countersignatory_revocation_base, Uint8Array countersignatory_htlc_base) {
+       public static Result_TxCreationKeysErrorZ constructor_derive_new(Uint8Array per_commitment_point, Uint8Array broadcaster_delayed_payment_base, Uint8Array broadcaster_htlc_base, Uint8Array countersignatory_revocation_base, Uint8Array countersignatory_htlc_base) {
                number ret = bindings.TxCreationKeys_derive_new(per_commitment_point, broadcaster_delayed_payment_base, broadcaster_htlc_base, countersignatory_revocation_base, countersignatory_htlc_base);
-               Result_TxCreationKeysSecpErrorZ ret_hu_conv = Result_TxCreationKeysSecpErrorZ.constr_from_ptr(ret);
+               Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
-       public static Result_TxCreationKeysSecpErrorZ constructor_from_channel_static_keys(Uint8Array per_commitment_point, ChannelPublicKeys broadcaster_keys, ChannelPublicKeys countersignatory_keys) {
+       public static Result_TxCreationKeysErrorZ constructor_from_channel_static_keys(Uint8Array per_commitment_point, ChannelPublicKeys broadcaster_keys, ChannelPublicKeys countersignatory_keys) {
                number ret = bindings.TxCreationKeys_from_channel_static_keys(per_commitment_point, broadcaster_keys == null ? 0 : broadcaster_keys.ptr & ~1, countersignatory_keys == null ? 0 : countersignatory_keys.ptr & ~1);
-               Result_TxCreationKeysSecpErrorZ ret_hu_conv = Result_TxCreationKeysSecpErrorZ.constr_from_ptr(ret);
+               Result_TxCreationKeysErrorZ ret_hu_conv = Result_TxCreationKeysErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(broadcaster_keys);
                ret_hu_conv.ptrs_to.add(countersignatory_keys);
                return ret_hu_conv;
index 84b2ca7f7b0f075fd07cb1606ebdbae39fc11eab..3966cb206b6ca37d92f5c83ce7b9ba8a870c6f14 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UnsignedChannelAnnouncement_free(this.ptr);
                     }
                 }
-       public UnsignedChannelAnnouncement clone() {
-               number ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
-               const ret_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelFeatures get_features() {
                number ret = bindings.UnsignedChannelAnnouncement_get_features(this.ptr);
                const ret_hu_conv: ChannelFeatures = new ChannelFeatures(null, ret);
@@ -35,14 +28,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_features(ChannelFeatures val) {
                bindings.UnsignedChannelAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public Uint8Array get_chain_hash() {
@@ -99,6 +84,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.UnsignedChannelAnnouncement_set_bitcoin_key_2(this.ptr, val);
        }
 
+       public UnsignedChannelAnnouncement clone() {
+               number ret = bindings.UnsignedChannelAnnouncement_clone(this.ptr);
+               const ret_hu_conv: UnsignedChannelAnnouncement = new UnsignedChannelAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UnsignedChannelAnnouncement_write(this.ptr);
                return ret;
index 133bc91f19d878843afb9d80fd01b06a91a2a4d7..4accac621135cd9494a3118abf0a0abfef5e4522 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UnsignedChannelUpdate_free(this.ptr);
                     }
                 }
-       public UnsignedChannelUpdate clone() {
-               number ret = bindings.UnsignedChannelUpdate_clone(this.ptr);
-               const ret_hu_conv: UnsignedChannelUpdate = new UnsignedChannelUpdate(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_chain_hash() {
                Uint8Array ret = bindings.UnsignedChannelUpdate_get_chain_hash(this.ptr);
                return ret;
@@ -97,6 +90,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.UnsignedChannelUpdate_set_fee_proportional_millionths(this.ptr, val);
        }
 
+       public UnsignedChannelUpdate clone() {
+               number ret = bindings.UnsignedChannelUpdate_clone(this.ptr);
+               const ret_hu_conv: UnsignedChannelUpdate = new UnsignedChannelUpdate(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UnsignedChannelUpdate_write(this.ptr);
                return ret;
index c874fc3be00e7297de7591cc485d372a67158739..e7a35ed53d96cbd527599349526936ffab59caef 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UnsignedNodeAnnouncement_free(this.ptr);
                     }
                 }
-       public UnsignedNodeAnnouncement clone() {
-               number ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr);
-               const ret_hu_conv: UnsignedNodeAnnouncement = new UnsignedNodeAnnouncement(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public NodeFeatures get_features() {
                number ret = bindings.UnsignedNodeAnnouncement_get_features(this.ptr);
                const ret_hu_conv: NodeFeatures = new NodeFeatures(null, ret);
@@ -35,14 +28,6 @@ import * as bindings from '../bindings' // TODO: figure out location
        public void set_features(NodeFeatures val) {
                bindings.UnsignedNodeAnnouncement_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
                this.ptrs_to.add(val);
-               // 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, val is reset to null and is now a dummy object.
-               val.ptr = 0;
        }
 
        public number get_timestamp() {
@@ -82,10 +67,17 @@ import * as bindings from '../bindings' // TODO: figure out location
        }
 
        public void set_addresses(NetAddress[] val) {
-               bindings.UnsignedNodeAnnouncement_set_addresses(this.ptr, (number[])Arrays.stream(val).map(arr_conv_12 -> arr_conv_12.ptr).toArray());
+               bindings.UnsignedNodeAnnouncement_set_addresses(this.ptr, Arrays.stream(val).map(val_conv_12 -> val_conv_12.ptr).toArray(number[]::new));
                /* TODO 2 NetAddress  */;
        }
 
+       public UnsignedNodeAnnouncement clone() {
+               number ret = bindings.UnsignedNodeAnnouncement_clone(this.ptr);
+               const ret_hu_conv: UnsignedNodeAnnouncement = new UnsignedNodeAnnouncement(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UnsignedNodeAnnouncement_write(this.ptr);
                return ret;
index 862a8763a093dc86e854521cdaf8293ad9f67c05..e4506a6b64a8f55d648596d2645217154cf97988 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UpdateAddHTLC_free(this.ptr);
                     }
                 }
-       public UpdateAddHTLC clone() {
-               number ret = bindings.UpdateAddHTLC_clone(this.ptr);
-               const ret_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.UpdateAddHTLC_get_channel_id(this.ptr);
                return ret;
@@ -70,15 +63,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.UpdateAddHTLC_set_cltv_expiry(this.ptr, val);
        }
 
+       public UpdateAddHTLC clone() {
+               number ret = bindings.UpdateAddHTLC_clone(this.ptr);
+               const ret_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UpdateAddHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateAddHTLC constructor_read(Uint8Array ser) {
+       public static Result_UpdateAddHTLCDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.UpdateAddHTLC_read(ser);
-               const ret_hu_conv: UpdateAddHTLC = new UpdateAddHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateAddHTLCDecodeErrorZ ret_hu_conv = Result_UpdateAddHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index bf4a4763688188e7f05917c6ffa48df315b8bea9..fcca5e86a87c30815c153bdc5c732793b6f474d7 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UpdateFailHTLC_free(this.ptr);
                     }
                 }
-       public UpdateFailHTLC clone() {
-               number ret = bindings.UpdateFailHTLC_clone(this.ptr);
-               const ret_hu_conv: UpdateFailHTLC = new UpdateFailHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.UpdateFailHTLC_get_channel_id(this.ptr);
                return ret;
@@ -43,15 +36,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.UpdateFailHTLC_set_htlc_id(this.ptr, val);
        }
 
+       public UpdateFailHTLC clone() {
+               number ret = bindings.UpdateFailHTLC_clone(this.ptr);
+               const ret_hu_conv: UpdateFailHTLC = new UpdateFailHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UpdateFailHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFailHTLC constructor_read(Uint8Array ser) {
+       public static Result_UpdateFailHTLCDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.UpdateFailHTLC_read(ser);
-               const ret_hu_conv: UpdateFailHTLC = new UpdateFailHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFailHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 52b6a71d572b4caddfedd18c11f841d4db8342e1..6068882e57f1a79c7a80ccedb45c5b49401e780c 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UpdateFailMalformedHTLC_free(this.ptr);
                     }
                 }
-       public UpdateFailMalformedHTLC clone() {
-               number ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr);
-               const ret_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.UpdateFailMalformedHTLC_get_channel_id(this.ptr);
                return ret;
@@ -52,15 +45,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                bindings.UpdateFailMalformedHTLC_set_failure_code(this.ptr, val);
        }
 
+       public UpdateFailMalformedHTLC clone() {
+               number ret = bindings.UpdateFailMalformedHTLC_clone(this.ptr);
+               const ret_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UpdateFailMalformedHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFailMalformedHTLC constructor_read(Uint8Array ser) {
+       public static Result_UpdateFailMalformedHTLCDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.UpdateFailMalformedHTLC_read(ser);
-               const ret_hu_conv: UpdateFailMalformedHTLC = new UpdateFailMalformedHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFailMalformedHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFailMalformedHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index b6b189ba7a1cb9bfb7b373e91bddb905d0e1275e..6ffed4250b308f36bc532ed7654690273649e462 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UpdateFee_free(this.ptr);
                     }
                 }
-       public UpdateFee clone() {
-               number ret = bindings.UpdateFee_clone(this.ptr);
-               const ret_hu_conv: UpdateFee = new UpdateFee(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.UpdateFee_get_channel_id(this.ptr);
                return ret;
@@ -50,15 +43,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public UpdateFee clone() {
+               number ret = bindings.UpdateFee_clone(this.ptr);
+               const ret_hu_conv: UpdateFee = new UpdateFee(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UpdateFee_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFee constructor_read(Uint8Array ser) {
+       public static Result_UpdateFeeDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.UpdateFee_read(ser);
-               const ret_hu_conv: UpdateFee = new UpdateFee(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFeeDecodeErrorZ ret_hu_conv = Result_UpdateFeeDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index 9e030d62da0edeb6b972fe4231d8cedd4638e680..02a0a7a5a588260416ddcc867186f2232c5c5fee 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UpdateFulfillHTLC_free(this.ptr);
                     }
                 }
-       public UpdateFulfillHTLC clone() {
-               number ret = bindings.UpdateFulfillHTLC_clone(this.ptr);
-               const ret_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public Uint8Array get_channel_id() {
                Uint8Array ret = bindings.UpdateFulfillHTLC_get_channel_id(this.ptr);
                return ret;
@@ -59,15 +52,21 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public UpdateFulfillHTLC clone() {
+               number ret = bindings.UpdateFulfillHTLC_clone(this.ptr);
+               const ret_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public Uint8Array write() {
                Uint8Array ret = bindings.UpdateFulfillHTLC_write(this.ptr);
                return ret;
        }
 
-       public static UpdateFulfillHTLC constructor_read(Uint8Array ser) {
+       public static Result_UpdateFulfillHTLCDecodeErrorZ constructor_read(Uint8Array ser) {
                number ret = bindings.UpdateFulfillHTLC_read(ser);
-               const ret_hu_conv: UpdateFulfillHTLC = new UpdateFulfillHTLC(null, ret);
-               ret_hu_conv.ptrs_to.add(ret_hu_conv);
+               Result_UpdateFulfillHTLCDecodeErrorZ ret_hu_conv = Result_UpdateFulfillHTLCDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;
        }
 
index a4cd7e8ce75a07a268ef7ce7dff1f3e789ef91bf..31f28d330d4fc832b971d4cc587157d8521ac7d7 100644 (file)
@@ -18,13 +18,6 @@ import * as bindings from '../bindings' // TODO: figure out location
                         bindings.UserConfig_free(this.ptr);
                     }
                 }
-       public UserConfig clone() {
-               number ret = bindings.UserConfig_clone(this.ptr);
-               const ret_hu_conv: UserConfig = new UserConfig(null, ret);
-               ret_hu_conv.ptrs_to.add(this);
-               return ret_hu_conv;
-       }
-
        public ChannelHandshakeConfig get_own_channel_config() {
                number ret = bindings.UserConfig_get_own_channel_config(this.ptr);
                const ret_hu_conv: ChannelHandshakeConfig = new ChannelHandshakeConfig(null, ret);
@@ -71,6 +64,13 @@ import * as bindings from '../bindings' // TODO: figure out location
                return ret_hu_conv;
        }
 
+       public UserConfig clone() {
+               number ret = bindings.UserConfig_clone(this.ptr);
+               const ret_hu_conv: UserConfig = new UserConfig(null, ret);
+               ret_hu_conv.ptrs_to.add(this);
+               return ret_hu_conv;
+       }
+
        public static UserConfig constructor_default() {
                number ret = bindings.UserConfig_default();
                const ret_hu_conv: UserConfig = new UserConfig(null, ret);
index aa56072770a3968c46421da01a17608c64def131..e797b75806d1b72b93bf385cf7eb50acf89d1fa1 100644 (file)
@@ -6,7 +6,7 @@
        }
 
        public static Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ constructor_BlockHashChannelManagerZ_read(Uint8Array ser, KeysInterface arg_keys_manager, FeeEstimator arg_fee_estimator, Watch arg_chain_monitor, BroadcasterInterface arg_tx_broadcaster, Logger arg_logger, UserConfig arg_default_config, ChannelMonitor[] arg_channel_monitors) {
-               number ret = bindings.C2Tuple_BlockHashChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_keys_manager == null ? 0 : arg_keys_manager.ptr, arg_fee_estimator == null ? 0 : arg_fee_estimator.ptr, arg_chain_monitor == null ? 0 : arg_chain_monitor.ptr, arg_tx_broadcaster == null ? 0 : arg_tx_broadcaster.ptr, arg_logger == null ? 0 : arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr & ~1, (number[])Arrays.stream(arg_channel_monitors).map(arr_conv_16 -> arr_conv_16 == null ? 0 : arr_conv_16.ptr & ~1).toArray()));
+               number ret = bindings.C2Tuple_BlockHashChannelManagerZ_read(ser, bindings.ChannelManagerReadArgs_new(arg_keys_manager == null ? 0 : arg_keys_manager.ptr, arg_fee_estimator == null ? 0 : arg_fee_estimator.ptr, arg_chain_monitor == null ? 0 : arg_chain_monitor.ptr, arg_tx_broadcaster == null ? 0 : arg_tx_broadcaster.ptr, arg_logger == null ? 0 : arg_logger.ptr, arg_default_config == null ? 0 : arg_default_config.ptr & ~1, Arrays.stream(arg_channel_monitors).map(arg_channel_monitors_conv_16 -> arg_channel_monitors_conv_16 == null ? 0 : arg_channel_monitors_conv_16.ptr & ~1).toArray(number[]::new)));
                Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ ret_hu_conv = Result_C2Tuple_BlockHashChannelManagerZDecodeErrorZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(arg_keys_manager);
                ret_hu_conv.ptrs_to.add(arg_fee_estimator);
index 269905b0a0b926e5668dd0faff44e0a8dd386033..b1a752e9994033b9bb8657a3ab9d7d1f124c9f13 100644 (file)
@@ -54,7 +54,7 @@ import * as bindings from '../bindings' // TODO: figure out location
 
                                                release_pending_monitor_events (): number[] {
                                                        MonitorEvent[] ret = arg.release_pending_monitor_events();
-                               result: number[] = (number[])Arrays.stream(ret).map(arr_conv_14 -> arr_conv_14 == null ? 0 : arr_conv_14.ptr & ~1).toArray();
+                               result: number[] = Arrays.stream(ret).map(ret_conv_14 -> ret_conv_14.ptr).toArray(number[]::new);
                                /* TODO 2 MonitorEvent  */;
                                return result;
                                                },
@@ -93,14 +93,14 @@ import * as bindings from '../bindings' // TODO: figure out location
 
        public MonitorEvent[] release_pending_monitor_events() {
                number[] ret = bindings.Watch_release_pending_monitor_events(this.ptr);
-               MonitorEvent[] arr_conv_14_arr = new MonitorEvent[ret.length];
+               MonitorEvent[] ret_conv_14_arr = new MonitorEvent[ret.length];
                for (int o = 0; o < ret.length; o++) {
-                       number arr_conv_14 = ret[o];
-                       const arr_conv_14_hu_conv: MonitorEvent = new MonitorEvent(null, arr_conv_14);
-                       arr_conv_14_hu_conv.ptrs_to.add(this);
-                       arr_conv_14_arr[o] = arr_conv_14_hu_conv;
+                       number ret_conv_14 = ret[o];
+                       MonitorEvent ret_conv_14_hu_conv = MonitorEvent.constr_from_ptr(ret_conv_14);
+                       ret_conv_14_hu_conv.ptrs_to.add(this);
+                       ret_conv_14_arr[o] = ret_conv_14_hu_conv;
                }
-               return arr_conv_14_arr;
+               return ret_conv_14_arr;
        }
 
 }
index 542487bc463fca2ff6b3e945f5c58fcb6c535a75..2bfd240bd22b8846f6cb5ffe00d74569c0adab6e 100644 (file)
@@ -692,7 +692,7 @@ const decodeString = (stringPointer, free = true) => {
                         out_c = out_c + arg_info.ret_conv[1].replace('\n', '\n\t') + "\n"
 
                 if fn_line.ret_ty_info.c_ty.endswith("Array"):
-                    out_c = out_c + "\t" + fn_line.ret_ty_info.c_ty + " arg = js_invoke_function_" + str(len(fn_line.args_ty)) + "(j_calls->" + fn_line.fn_name + "_meth"
+                    out_c = out_c + "\t" + fn_line.ret_ty_info.c_ty + " ret = js_invoke_function_" + str(len(fn_line.args_ty)) + "(j_calls->" + fn_line.fn_name + "_meth"
                 elif fn_line.ret_ty_info.java_ty == "void":
                     out_c = out_c + "\tjs_invoke_function_" + str(len(fn_line.args_ty)) + "(j_calls->" + fn_line.fn_name + "_meth"
                 elif not fn_line.ret_ty_info.passed_as_ptr: